diff options
author | Nadav Rotem <nrotem@apple.com> | 2012-09-06 09:17:37 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2012-09-06 09:17:37 +0000 |
commit | 7c277da364716fdfd16d11bcbc26463e8ffe20b1 (patch) | |
tree | bab49595d509de5d7bef3cdd8eecad87f2cfda80 /llvm/lib/CodeGen/Passes.cpp | |
parent | 34e9931bec0bd85862fb6ed2e14b43cb3e43fe4c (diff) | |
download | bcm5719-llvm-7c277da364716fdfd16d11bcbc26463e8ffe20b1.tar.gz bcm5719-llvm-7c277da364716fdfd16d11bcbc26463e8ffe20b1.zip |
Add a new optimization pass: Stack Coloring, that merges disjoint static allocations (allocas). Allocas are known to be
disjoint if they are marked by disjoint lifetime markers (@llvm.lifetime.XXX intrinsics).
llvm-svn: 163299
Diffstat (limited to 'llvm/lib/CodeGen/Passes.cpp')
-rw-r--r-- | llvm/lib/CodeGen/Passes.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/Passes.cpp b/llvm/lib/CodeGen/Passes.cpp index 9564b5dbe1e..a6dd5decbea 100644 --- a/llvm/lib/CodeGen/Passes.cpp +++ b/llvm/lib/CodeGen/Passes.cpp @@ -529,6 +529,10 @@ void TargetPassConfig::addMachineSSAOptimization() { // instructions dead. addPass(&OptimizePHIsID); + // This pass merges large allocas. StackSlotColoring is a different pass + // which merges spill slots. + addPass(&StackColoringID); + // If the target requests it, assign local variables to stack slots relative // to one another and simplify frame index references where possible. addPass(&LocalStackSlotAllocationID); |