[LLVMdev] Upcoming Changes/Additions to Scoped-NoAlias metadata

Philip Reames
Fri, 14 Nov 2014 17:57:54 -0000

On 11/13/2014 05:02 PM, Chandler Carruth wrote:
>
>     This intrinsic needs to carry control dependencies (it cannot be
>     hoisted out of a loop, for example) -- in this sense it is very
>     much like @llvm.assume. And like @llvm.assume, we'll need to add
>     logic to various passes to ignore it as appropriate so that it
>     does not block optimizations unnecessarily.
>
>
> We should do something to make this simpler. I think we should have an
> intrinsic inst base class that assume, lifetime, and other intrinsics
> which do not represent actual code in the final program derive from so
> that we don't have to update these lists all over the place. If we
> need 2 tiers to model assume & noalias as distinct from the lifetime
> or other intrinsics, fine. We should have high-level categories that
> can be tested and updated.
Agreed.

Specific to this point, I've seen a number of cases in discussion
recently where a notion of a intrinsic which is control dependent on
surrounding control flow, but does not read or write memory would be
useful.  It really feels like that's what the current implementation of
llvm.assume has become and likely what this proposal would require.
Maybe it's time to introduce a notion of an arbitrary non-memory control
dependence?

Cases that come to mind:
- invariant.*
- lifetime.*
- float point state changes (this last one might need a stronger
restriction than the others)

Philip
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20141114/1c4980be/attachment.html>