[LLVMdev] Segmented Stacks (re-roll)
Sanjoy Das
sanjoy at playingwithpointers.com
Tue Aug 23 18:52:27 PDT 2011
Hi!
> According to the patch you send, the pass is not doing anything:
>
> +bool StackSegmenter::runOnMachineFunction(MachineFunction &MF) {
> + return false;
> +}
> +
It is, in the next patch.
diff --git a/lib/CodeGen/StackSegmenter.cpp b/lib/CodeGen/StackSegmenter.cpp
index 5ffb8f2..cc2ca87 100644
--- a/lib/CodeGen/StackSegmenter.cpp
+++ b/lib/CodeGen/StackSegmenter.cpp
@@ -40,7 +40,10 @@ void StackSegmenter::getAnalysisUsage(AnalysisUsage
&info) const {
}
bool StackSegmenter::runOnMachineFunction(MachineFunction &MF) {
- return false;
+ const TargetFrameLowering &TFI = *MF.getTarget().getFrameLowering();
+ TFI.adjustForSegmentedStacks(MF);
+ // adjustForSegmentedStacks always changes the MachineFunction
+ return true;
}
FunctionPass *llvm::createStackSegmenter() {
--
Sanjoy Das
http://playingwithpointers.com
More information about the llvm-dev
mailing list