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 | 419e8a62997987e0509efe721c1ea81ac29f09f3 (patch) | |
tree | caefd2fe04ddd2185adfdece3eddb39cff9ce4bd /lib/Transforms/Utils/Mem2Reg.cpp | |
parent | 5860c6c09e58c3f6d19cee4458320c42a5d17298 (diff) |
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%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/Mem2Reg.cpp')
-rw-r--r-- | lib/Transforms/Utils/Mem2Reg.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp index 2b1364c81e..ea2f8fca5f 100644 --- a/lib/Transforms/Utils/Mem2Reg.cpp +++ b/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; } |