[PATCH] D24844: GVN-hoist: disable hoisting stores past calls (PR30499)

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 15:07:39 PDT 2016


On Thu, Sep 22, 2016 at 5:02 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> hfinkel added a subscriber: hfinkel.
>
> ================
> Comment at: llvm/lib/Transforms/Scalar/GVNHoist.cpp:368
> @@ -363,1 +367,3 @@
> +
> +      if (!AA->isNoAlias(DefLoc, MemoryLocation::get(Insn)))
>          return true;
> ----------------
> You could do something like:
>
>   if (AA->getModRef(Insn, DefLoc) != MRI_NoModRef)
>     return true;
>
> and that should handle calls.
>
>
(This will only work if MemoryDef is really always a StoreInst)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160922/168e46fa/attachment.html>


More information about the llvm-commits mailing list