[PATCH] D47874: [SCEVExp] Advance found insertion point until we find a non-dbg instruction.
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 21 12:08:15 PDT 2018
vsk added a comment.
In https://reviews.llvm.org/D47874#1139746, @efriedma wrote:
> LGTM assuming you're planning to regression-test this somehow.
I'm planning on verifying the change. The testing process is roughly:
$ find test/Transforms -name \*.ll | parallel opt-check-dbg-invar.sh $OPT {} -loop-vectorize
================
Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:95
- while (isa<PHINode>(IP))
+ while (isa<PHINode>(IP) || isa<DbgInfoIntrinsic>(IP))
++IP;
----------------
vsk wrote:
> efriedma wrote:
> > This handling isn't consistent with the handling for landing pads/etc.
> Would it be correct to write "IP = advancePastNonAffectingInsts(IP)", everywhere we see "++IP" here?
I suppose this wouldn't be useful, because dbg.values aren't allowed to occur before phis / eh instructions.
================
Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:105
}
return IP;
----------------
Why not skip debug instructions here, instead? It should make less work for callers of findInsertPointAfter, right?
https://reviews.llvm.org/D47874
More information about the llvm-commits
mailing list