[PATCH] D23174: GVN-hoist: fix early exit logic

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 13:53:44 PDT 2016


IMHO, you should just refactor that and call it "isRelevantInstruction" or
something.

There are others you are likely to want to ignore.



On Thu, Aug 4, 2016 at 1:44 PM, Sebastian Pop <sebpop at gmail.com> wrote:

> sebpop added inline comments.
>
> ================
> Comment at: lib/Transforms/Scalar/GVNHoist.cpp:897
> @@ +896,3 @@
> +          // Also do not bother analyzing the following kinds of
> instructions.
> +          if (!isa<TerminatorInst>(&I1))
> +            II.insert(&I1, VN);
> ----------------
> dberlin wrote:
> > I hope this is not a correctness fix :)
> Nop. This is a compilation time fix: as I was saying in the commit
> message, we should not try to analyze to hoist this kind of "scalar
> instructions".
>
>
> https://reviews.llvm.org/D23174
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160804/3fb90d65/attachment.html>


More information about the llvm-commits mailing list