From 501e739d8a668ddcad2c240f077d0e1f4450a764 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Thu, 5 May 2016 16:39:31 +0000 Subject: X86CallFrameOptimization: make adjustCallSequence's return type void It always returned the same value (true). No functionality change. llvm-svn: 268645 --- llvm/lib/Target/X86/X86CallFrameOptimization.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'llvm/lib/Target/X86/X86CallFrameOptimization.cpp') diff --git a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp index ac71fc2e5bd..367ae4f4b5a 100644 --- a/llvm/lib/Target/X86/X86CallFrameOptimization.cpp +++ b/llvm/lib/Target/X86/X86CallFrameOptimization.cpp @@ -88,7 +88,7 @@ private: void collectCallInfo(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I, CallContext &Context); - bool adjustCallSequence(MachineFunction &MF, const CallContext &Context); + void adjustCallSequence(MachineFunction &MF, const CallContext &Context); MachineInstr *canFoldIntoRegPush(MachineBasicBlock::iterator FrameSetup, unsigned Reg); @@ -245,9 +245,12 @@ bool X86CallFrameOptimization::runOnMachineFunction(MachineFunction &MF) { if (!isProfitable(MF, CallSeqVector)) return false; - for (auto CC : CallSeqVector) - if (CC.UsePush) - Changed |= adjustCallSequence(MF, CC); + for (auto CC : CallSeqVector) { + if (CC.UsePush) { + adjustCallSequence(MF, CC); + Changed = true; + } + } return Changed; } @@ -445,7 +448,7 @@ void X86CallFrameOptimization::collectCallInfo(MachineFunction &MF, Context.UsePush = true; } -bool X86CallFrameOptimization::adjustCallSequence(MachineFunction &MF, +void X86CallFrameOptimization::adjustCallSequence(MachineFunction &MF, const CallContext &Context) { // Ok, we can in fact do the transformation for this call. // Do not remove the FrameSetup instruction, but adjust the parameters. @@ -543,8 +546,6 @@ bool X86CallFrameOptimization::adjustCallSequence(MachineFunction &MF, // frame. X86MachineFunctionInfo *FuncInfo = MF.getInfo(); FuncInfo->setHasPushSequences(true); - - return true; } MachineInstr *X86CallFrameOptimization::canFoldIntoRegPush( -- cgit v1.2.3