[llvm-dev] Potential issue with noalias @malloc and @realloc

Daniel Berlin via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 11 18:45:02 PDT 2017

> We have no way of specifying the lifetime has ended, either.
> You can make the problem as hard or as simple as you want above, but you
> can't solve it in general.
> Even if you wanted to, it is in fact, trivial to come up with cases where
> basicaa will say no alias for the load/store, but not say noalias at the
> propagation point.

In fact, you can make it worse than this.
You can get our AA to say may-alias/must-alias for the memory during gvn,
and say noalias for the same pair of pointers by the time licm rolls around.

The only real solution, IMHO,  is to this is to have real object
lifetime/ordering chains and build an SSA-like form for them like memoryssa.
The languages generate the lifetime orderings.

(Giving up on noalias for this case only fixes this case, it still affects
other languages, etc)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170411/70cf33db/attachment.html>

More information about the llvm-dev mailing list