diff options
| author | Jim Grosbach <grosbach@apple.com> | 2009-10-07 22:26:31 +0000 |
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2009-10-07 22:26:31 +0000 |
| commit | 267fa622fa0186b27c5b6a59215a85201250e421 (patch) | |
| tree | ad2150e695cd73928e47fe68a41d6c58782e0c0a /llvm/lib | |
| parent | 6c966c458aba61e965f58b4739a255cc82049b69 (diff) | |
| download | bcm5719-llvm-267fa622fa0186b27c5b6a59215a85201250e421.tar.gz bcm5719-llvm-267fa622fa0186b27c5b6a59215a85201250e421.zip | |
Enable thumb1 register scavenging by default.
llvm-svn: 83496
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 11 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.h | 5 |
2 files changed, 6 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index 55298a4dded..896689cc1ec 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -44,16 +44,6 @@ char PEI::ID = 0; static RegisterPass<PEI> X("prologepilog", "Prologue/Epilogue Insertion"); -// FIXME: For now, the frame index scavenging is off by default and only -// used by the Thumb1 target. When it's the default and replaces the current -// on-the-fly PEI scavenging for all targets, requiresRegisterScavenging() -// will replace this. -cl::opt<bool> -FrameIndexVirtualScavenging("enable-frame-index-scavenging", - cl::Hidden, - cl::desc("Enable frame index elimination with" - "virtual register scavenging")); - /// createPrologEpilogCodeInserter - This function returns a pass that inserts /// prolog and epilog code, and eliminates abstract frame references. /// @@ -66,6 +56,7 @@ bool PEI::runOnMachineFunction(MachineFunction &Fn) { const Function* F = Fn.getFunction(); const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo(); RS = TRI->requiresRegisterScavenging(Fn) ? new RegScavenger() : NULL; + FrameIndexVirtualScavenging = TRI->requiresFrameIndexScavenging(Fn); // Get MachineModuleInfo so that we can track the construction of the // frame. diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.h b/llvm/lib/CodeGen/PrologEpilogInserter.h index ee759e8622c..030922a0265 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.h +++ b/llvm/lib/CodeGen/PrologEpilogInserter.h @@ -95,6 +95,11 @@ namespace llvm { // functions. bool ShrinkWrapThisFunction; + // Flag to control whether to use the register scavenger to resolve + // frame index materialization registers. Set according to + // TRI->requiresFrameIndexScavenging() for the curren function. + bool FrameIndexVirtualScavenging; + // When using the scavenger post-pass to resolve frame reference // materialization registers, maintain a map of the registers to // the constant value and SP adjustment associated with it. |

