diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-01-17 07:26:51 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-01-17 07:26:51 +0000 |
commit | b1086a9c6d6d5ee3070a68076f38eec841cefd58 (patch) | |
tree | b9674ae45492536e692392c897e7bdea926532c4 /lib/Transforms/Utils/Mem2Reg.cpp | |
parent | 119266c4ae2803e11229034b74813242b5978566 (diff) |
Roll out r123609 due to failures on the llvm-x86_64-linux-checks bot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123618 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, 4 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp index ea2f8fca5f..2b1364c81e 100644 --- a/lib/Transforms/Utils/Mem2Reg.cpp +++ b/lib/Transforms/Utils/Mem2Reg.cpp @@ -40,6 +40,7 @@ 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>(); @@ -53,6 +54,7 @@ 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) @@ -64,6 +66,7 @@ bool PromotePass::runOnFunction(Function &F) { bool Changed = false; DominatorTree &DT = getAnalysis<DominatorTree>(); + DominanceFrontier &DF = getAnalysis<DominanceFrontier>(); while (1) { Allocas.clear(); @@ -77,7 +80,7 @@ bool PromotePass::runOnFunction(Function &F) { if (Allocas.empty()) break; - PromoteMemToReg(Allocas, DT); + PromoteMemToReg(Allocas, DT, DF); NumPromoted += Allocas.size(); Changed = true; } |