[llvm] r221311 - Revert earlier change removing setPreservesCFG from instcombine (r221223) and

Philip Reames listmail at philipreames.com
Wed Nov 5 17:02:52 PST 2014


You can ignore my comment on the other thread.  In the future, please 
respond to the reverted thread when reverting to avoid this type of 
wasted effort.

On 11/04/2014 03:16 PM, Eric Christopher wrote:
> FWIW it's often easier to read if you revert the original and then add 
> the change as a separate pass.
>
> -eric
>
> On Tue Nov 04 2014 at 3:15:28 PM Mark Heffernan <meheff at google.com 
> <mailto:meheff at google.com>> wrote:
>
>     Author: meheff
>     Date: Tue Nov  4 17:02:09 2014
>     New Revision: 221311
>
>     URL: http://llvm.org/viewvc/llvm-project?rev=221311&view=rev
>     Log:
>     Revert earlier change removing setPreservesCFG from instcombine
>     (r221223) and
>     change LoopSimplifyPass to be !isCFGOnly.  The motivation for the
>     earlier patch
>     (r221223) was that LoopSimplify is not preserved by instcombine though
>     setPreservesCFG indicates that it is.  This change fixes the issue
>     by making setPreservesCFG no longer imply LoopSimplifyPass, and is
>     therefore less
>     invasive.
>
>
>
>     Modified:
>         llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>         llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
>
>     Modified:
>     llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>     URL:
>     http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=221311&r1=221310&r2=221311&view=diff
>     ==============================================================================
>     --- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>     (original)
>     +++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>     Tue Nov  4 17:02:09 2014
>     @@ -90,8 +90,7 @@ INITIALIZE_PASS_END(InstCombiner, "instc
>                      "Combine redundant instructions", false, false)
>
>      void InstCombiner::getAnalysisUsage(AnalysisUsage &AU) const {
>     -  AU.addPreserved<DominatorTreeWrapperPass>();
>     -  AU.addPreserved<LoopInfo>();
>     +  AU.setPreservesCFG();
>        AU.addRequired<AssumptionTracker>();
>        AU.addRequired<TargetLibraryInfo>();
>      }
>
>     Modified: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
>     URL:
>     http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp?rev=221311&r1=221310&r2=221311&view=diff
>     ==============================================================================
>     --- llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp (original)
>     +++ llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Tue Nov 4
>     17:02:09 2014
>     @@ -778,12 +778,12 @@ namespace {
>
>      char LoopSimplify::ID = 0;
>      INITIALIZE_PASS_BEGIN(LoopSimplify, "loop-simplify",
>     -                "Canonicalize natural loops", true, false)
>     +                "Canonicalize natural loops", false, false)
>      INITIALIZE_PASS_DEPENDENCY(AssumptionTracker)
>      INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
>      INITIALIZE_PASS_DEPENDENCY(LoopInfo)
>      INITIALIZE_PASS_END(LoopSimplify, "loop-simplify",
>     -                "Canonicalize natural loops", true, false)
>     +                "Canonicalize natural loops", false, false)
>
>      // Publicly exposed interface to pass...
>      char &llvm::LoopSimplifyID = LoopSimplify::ID;
>
>
>     _______________________________________________
>     llvm-commits mailing list
>     llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
>     http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141105/8ab3a8ec/attachment.html>


More information about the llvm-commits mailing list