[PATCH] D32409: [PM/LoopUnswitch] Introduce a new, simpler loop unswitch pass.
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 09:49:58 PDT 2017
sanjoy accepted this revision.
sanjoy added a comment.
This lgtm.
================
Comment at: lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:122
+ // exit block.
+ DT.changeImmediateDominator(UnswitchedNode, OldPHNode);
+
----------------
chandlerc wrote:
> davide wrote:
> > sanjoy wrote:
> > > Instead of special casing here, why not just
> > >
> > > ```
> > > SmallSetVector<BasicBlock *, 4> Worklist;
> > > Worklist.insert(UnswitchedNode);
> > > ```
> > >
> > > and let nature run its course?
> > +1
> I mean, I still need the comment on that line, and it is no shorter, and it avoids a pointless query to the DomChain set?
>
> I can make the change if you want, just seems odd.
Okay what you have now lgtm.
https://reviews.llvm.org/D32409
More information about the llvm-commits
mailing list