[llvm] r268645 - X86CallFrameOptimization: make adjustCallSequence's return type void
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 09:39:31 PDT 2016
Author: hans
Date: Thu May 5 11:39:31 2016
New Revision: 268645
URL: http://llvm.org/viewvc/llvm-project?rev=268645&view=rev
Log:
X86CallFrameOptimization: make adjustCallSequence's return type void
It always returned the same value (true). No functionality change.
Modified:
llvm/trunk/lib/Target/X86/X86CallFrameOptimization.cpp
Modified: llvm/trunk/lib/Target/X86/X86CallFrameOptimization.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CallFrameOptimization.cpp?rev=268645&r1=268644&r2=268645&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86CallFrameOptimization.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86CallFrameOptimization.cpp Thu May 5 11:39:31 2016
@@ -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::runOnMach
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::collectCa
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::adjustCal
// frame.
X86MachineFunctionInfo *FuncInfo = MF.getInfo<X86MachineFunctionInfo>();
FuncInfo->setHasPushSequences(true);
-
- return true;
}
MachineInstr *X86CallFrameOptimization::canFoldIntoRegPush(
More information about the llvm-commits
mailing list