[llvm-commits] [llvm] r52053 - /llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
Devang Patel
dpatel at apple.com
Fri Jun 6 10:50:59 PDT 2008
Author: dpatel
Date: Fri Jun 6 12:50:58 2008
New Revision: 52053
URL: http://llvm.org/viewvc/llvm-project?rev=52053&view=rev
Log:
LoopSimplify preserves AA.
Modified:
llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
Modified: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp?rev=52053&r1=52052&r2=52053&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Fri Jun 6 12:50:58 2008
@@ -73,6 +73,7 @@
AU.addPreserved<LoopInfo>();
AU.addPreserved<DominatorTree>();
AU.addPreserved<DominanceFrontier>();
+ AU.addPreserved<AliasAnalysis>();
AU.addPreservedID(BreakCriticalEdgesID); // No critical edges added.
}
@@ -252,9 +253,10 @@
for (BasicBlock::iterator I = L->getHeader()->begin();
(PN = dyn_cast<PHINode>(I++)); )
if (Value *V = PN->hasConstantValue()) {
- PN->replaceAllUsesWith(V);
- PN->eraseFromParent();
- }
+ if (AA) AA->deleteValue(PN);
+ PN->replaceAllUsesWith(V);
+ PN->eraseFromParent();
+ }
return Changed;
}
More information about the llvm-commits
mailing list