[PATCH] D47874: [SCEVExp] Advance found insertion point until we find a non-dbg instruction.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 14 11:38:21 PDT 2018


Probably overkill, but I'd imagine the way to do this would be a trait
class that implements the two different tests depending on the type of the
node. (I guess a generic "isDebugInstruction" function that uses that trait
could be a handy general purpose tool to have, maybe? (so you don't have to
think so hard about different way s of testing whether something is a debug
instruction in MC versus IR))

On Thu, Jun 14, 2018 at 8:57 AM Adrian Prantl via Phabricator <
reviews at reviews.llvm.org> wrote:

> aprantl added a comment.
>
> In https://reviews.llvm.org/D47874#1132374, @fhahn wrote:
>
> > I've updated the patch to add a skipDebugInstructionsForward utility. We
> have a very similar function defined in MachineBasicBlock.h, maybe we
> should consolidate those functions?
>
>
> The MachineBasicBlock.h function operates on MachineInstrs the one in
> BasicBlock operates on Instructions. I'm not sure how to unify these:
> perhaps by adding a skipForwardWhile(std::function(bool() shouldSkip)
> primitive to ilist?
>
>
> https://reviews.llvm.org/D47874
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180614/5a5e3a3e/attachment.html>


More information about the llvm-commits mailing list