[llvm] r221223 - Remove setPreservesCFG from instcombine. The pass, in particular, does not
Philip Reames
listmail at philipreames.com
Wed Nov 5 16:55:43 PST 2014
I'm not sure I follow the logic behind this change.
InstCombine itself doesn't change the CFG. It sounds like there's some
interaction with other passes which causes a problem? Isn't that a bug
in some other pass?
Philip
On 11/03/2014 05:51 PM, Mark Heffernan wrote:
> 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>();
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list