[llvm] r221223 - Remove setPreservesCFG from instcombine. The pass,	in particular, does not
    Mark Heffernan 
    meheff at google.com
       
    Mon Nov  3 17:51:02 PST 2014
    
    
  
Author: meheff
Date: Mon Nov  3 19:51:01 2014
New Revision: 221223
URL: http://llvm.org/viewvc/llvm-project?rev=221223&view=rev
Log:
Remove setPreservesCFG from instcombine.  The pass, in particular, does not
preserve LoopSimplify because instcombine may replace branch predicates
with undef which loop simplify then replaces with always exit.  Replace
setPreservesCFG with the more constrained preservation of DomTree and
LoopInfo.
Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=221223&r1=221222&r2=221223&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Mon Nov  3 19:51:01 2014
@@ -90,7 +90,8 @@ INITIALIZE_PASS_END(InstCombiner, "instc
                 "Combine redundant instructions", false, false)
 
 void InstCombiner::getAnalysisUsage(AnalysisUsage &AU) const {
-  AU.setPreservesCFG();
+  AU.addPreserved<DominatorTreeWrapperPass>();
+  AU.addPreserved<LoopInfo>();
   AU.addRequired<AssumptionTracker>();
   AU.addRequired<TargetLibraryInfo>();
 }
    
    
More information about the llvm-commits
mailing list