[PATCH] D47874: [SCEVExpander] Ignore dbg info when finding insertion point.

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 8 13:49:20 PDT 2018


davide added a comment.

In https://reviews.llvm.org/D47874#1125517, @fhahn wrote:

> In https://reviews.llvm.org/D47874#1125474, @efriedma wrote:
>
> > Not sure this is the best fix.  The function is named findInsertPointAfter; from the name, I would expect it to behave similarly to BasicBlock::getFirstInsertionPt (which does not try to move past debug info).
> >
> > We added instructionsWithoutDebug recently to deal with this sort of issue, but it's not directly usable here.
>
>
> Yeah, maybe we should have a function that takes an iterator and advances the iterator to the first non debug/meta instruction?


I think so, we could also refactor https://reviews.llvm.org/rL334317 to be less cumbersome.
Are you going to work on this or you want me to? [I suspect we're going to find more places where we need the utility so the sooner we get this done, the better].


https://reviews.llvm.org/D47874





More information about the llvm-commits mailing list