[PATCH] D25542: GVN-hoist: avoid calling MemoryLocation::get() on a call (PR30499)

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 20:26:19 PDT 2016


You can get rid of UseInst too, MemoryLocOrCall will take a MemoryUse
directly :)


On Wed, Oct 12, 2016 at 8:20 PM, Sebastian Pop <sebpop at gmail.com> wrote:

> On Wed, Oct 12, 2016 at 10:05 PM, Daniel Berlin <dberlin at dberlin.org>
> wrote:
> > There is actually a much simpler fix you sholdl use.
> >
> > return instructionClobbersQuery(MD, MU MemoryLocOrCall(MU), AA);
> >
> > You need to move that version of instructionClobbersQuery up, but it was
> > built to always do the right thing.
> >
> > Also note it will properly handle a case you are not: Fences do not have
> > memorylocations, and calling get on them will also crash.
> >
>
> Right. I will commit the attached patch after testing.
>
> Thanks,
> Sebastian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161012/c7f77db0/attachment.html>


More information about the llvm-commits mailing list