diff options
| author | Cameron Zwarich <zwarich@apple.com> | 2011-01-17 17:38:41 +0000 |
|---|---|---|
| committer | Cameron Zwarich <zwarich@apple.com> | 2011-01-17 17:38:41 +0000 |
| commit | b410858a5f15014ae2f8c66ed77ed0fc87f27f37 (patch) | |
| tree | 045fe2436d4c3681191471a1f46672337073c7e0 /llvm/lib/Transforms/Utils/Mem2Reg.cpp | |
| parent | ea49cb04a53acdb11de8c3258c8a0011368c0ee9 (diff) | |
| download | bcm5719-llvm-b410858a5f15014ae2f8c66ed77ed0fc87f27f37.tar.gz bcm5719-llvm-b410858a5f15014ae2f8c66ed77ed0fc87f27f37.zip | |
Roll r123609 back in with two changes that fix test failures with expensive
checks enabled:
1) Use '<' to compare integers in a comparison function rather than '<='.
2) Use the uniqued set DefBlocks rather than Info.DefiningBlocks to initialize
the priority queue.
The speedup of scalarrepl on test-suite + SPEC2000 + SPEC2006 is a bit less, at
just under 16% rather than 17%.
llvm-svn: 123662
Diffstat (limited to 'llvm/lib/Transforms/Utils/Mem2Reg.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/Mem2Reg.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/Mem2Reg.cpp b/llvm/lib/Transforms/Utils/Mem2Reg.cpp index 2b1364c81e7..ea2f8fca5f2 100644 --- a/llvm/lib/Transforms/Utils/Mem2Reg.cpp +++ b/llvm/lib/Transforms/Utils/Mem2Reg.cpp @@ -40,7 +40,6 @@ namespace { // virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<DominatorTree>(); - AU.addRequired<DominanceFrontier>(); AU.setPreservesCFG(); // This is a cluster of orthogonal Transforms AU.addPreserved<UnifyFunctionExitNodes>(); @@ -54,7 +53,6 @@ char PromotePass::ID = 0; INITIALIZE_PASS_BEGIN(PromotePass, "mem2reg", "Promote Memory to Register", false, false) INITIALIZE_PASS_DEPENDENCY(DominatorTree) -INITIALIZE_PASS_DEPENDENCY(DominanceFrontier) INITIALIZE_PASS_END(PromotePass, "mem2reg", "Promote Memory to Register", false, false) @@ -66,7 +64,6 @@ bool PromotePass::runOnFunction(Function &F) { bool Changed = false; DominatorTree &DT = getAnalysis<DominatorTree>(); - DominanceFrontier &DF = getAnalysis<DominanceFrontier>(); while (1) { Allocas.clear(); @@ -80,7 +77,7 @@ bool PromotePass::runOnFunction(Function &F) { if (Allocas.empty()) break; - PromoteMemToReg(Allocas, DT, DF); + PromoteMemToReg(Allocas, DT); NumPromoted += Allocas.size(); Changed = true; } |

