[PATCH] D21041: [GVN] PRE can't hoist loads across calls in general.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 16:50:59 PDT 2016


Whatever we choose, i think we need to take a step back and evaluate the
larger problem and whether we are solving it in the best way, rather than
 just add tons of "check every instruction between hear and there" code :)

(If we end up thinking that is truly the best way, great, i'll not object.
i'm more concerned that we are just trying to patch what we see as bugs
instead of stopping to think about whether the whole thing is just broken
and in need of rethinking, because i suspect it is.)


On Mon, Jun 6, 2016 at 4:44 PM, Sanjoy Das <sanjoy at playingwithpointers.com>
wrote:

> sanjoy added a subscriber: broune.
> sanjoy added a comment.
>
> One possibility is writing a "strong post dominance" analysis pass that
> was brought up by @broune earlier [0].  If it looks like a lot of LLVM's
> transform passes are buggy in the face of `exit(0)` or throwing or
> inf-looping calls, perhaps we will be okay paying the cost of computing and
> preserving this analysis?
>
> We also need some infrastructural work around "halting" or
> "always_returns" attributes; I suspect the bug you're fixing here will also
> occur if the function being called does `volatile int i = 0; while (true)
> i++;` instead of `exit(0)`.
>
> [0]: http://lists.llvm.org/pipermail/llvm-dev/2015-July/087744.html
>
>
> http://reviews.llvm.org/D21041
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160606/fd4b3bc6/attachment.html>


More information about the llvm-commits mailing list