Move enabling the local stack allocation pass into the target where it belongs.

For now it's still a command line option, but the interface to the generic
code doesn't need to know that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111942 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach
2010-08-24 19:05:43 +00:00
parent 05ea54e886
commit a273442891
6 changed files with 26 additions and 23 deletions

View File

@@ -43,9 +43,12 @@ namespace llvm {
cl::opt<bool>
ReuseFrameIndexVals("arm-reuse-frame-index-vals", cl::Hidden, cl::init(true),
cl::desc("Reuse repeated frame index values"));
cl::opt<bool>
static cl::opt<bool>
ForceAllBaseRegAlloc("arm-force-base-reg-alloc", cl::Hidden, cl::init(true),
cl::desc("Force use of virtual base registers for stack load/store"));
static cl::opt<bool>
EnableLocalStackAlloc("enable-local-stack-alloc", cl::init(false), cl::Hidden,
cl::desc("Enable pre-regalloc stack frame index allocation"));
}
using namespace llvm;
@@ -1285,6 +1288,11 @@ requiresFrameIndexScavenging(const MachineFunction &MF) const {
return true;
}
bool ARMBaseRegisterInfo::
requiresVirtualBaseRegisters(const MachineFunction &MF) const {
return EnableLocalStackAlloc;
}
// hasReservedCallFrame - Under normal circumstances, when a frame pointer is
// not required, we reserve argument space for call sites in the function
// immediately on entry to the current function. This eliminates the need for

View File

@@ -154,6 +154,8 @@ public:
virtual bool requiresFrameIndexScavenging(const MachineFunction &MF) const;
virtual bool requiresVirtualBaseRegisters(const MachineFunction &MF) const;
virtual bool hasReservedCallFrame(const MachineFunction &MF) const;
virtual bool canSimplifyCallFramePseudos(const MachineFunction &MF) const;