summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-08-24 19:05:43 +0000
committerJim Grosbach <grosbach@apple.com>2010-08-24 19:05:43 +0000
commitb77d67f318f28e5028254a94502ff1125b75d0b9 (patch)
treee98c5174b29641b9fc0f5a11db1a4d6d9b720fc4 /llvm/lib/CodeGen/LLVMTargetMachine.cpp
parenta209503467ffbb46068646a46780738041da49a1 (diff)
downloadbcm5719-llvm-b77d67f318f28e5028254a94502ff1125b75d0b9.tar.gz
bcm5719-llvm-b77d67f318f28e5028254a94502ff1125b75d0b9.zip
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. llvm-svn: 111942
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index b856d9093eb..80dbb988df6 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -74,16 +74,6 @@ static cl::opt<bool> EnableMCLogging("enable-mc-api-logging", cl::Hidden,
static cl::opt<bool> VerifyMachineCode("verify-machineinstrs", cl::Hidden,
cl::desc("Verify generated machine code"),
cl::init(getenv("LLVM_VERIFY_MACHINEINSTRS")!=NULL));
-// Enabled or disable local stack object block allocation. This is an
-// experimental pass that allocates locals relative to one another before
-// register allocation and then assigns them to actual stack slots as a block
-// later in PEI. This will eventually allow targets with limited index offset
-// range to allocate additional base registers (not just FP and SP) to
-// more efficiently reference locals, as well as handle situations where
-// locals cannot be referenced via SP or FP at all (dynamic stack realignment
-// together with variable sized objects, for example).
-cl::opt<bool> EnableLocalStackAlloc("enable-local-stack-alloc", cl::init(false),
- cl::Hidden, cl::desc("Enable pre-regalloc stack frame index allocation"));
static cl::opt<cl::boolOrDefault>
AsmVerbose("asm-verbose", cl::desc("Add comments to directives."),
@@ -354,11 +344,9 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
if (OptLevel != CodeGenOpt::None)
PM.add(createOptimizePHIsPass());
- // Assign local variables to stack slots relative to one another and simplify
- // frame index references where possible. Final stack slot locations will be
- // assigned in PEI.
- if (EnableLocalStackAlloc)
- PM.add(createLocalStackSlotAllocationPass());
+ // If the target requests it, assign local variables to stack slots relative
+ // to one another and simplify frame index references where possible.
+ PM.add(createLocalStackSlotAllocationPass());
if (OptLevel != CodeGenOpt::None) {
// With optimization, dead code should already be eliminated. However
OpenPOWER on IntegriCloud