[llvm-commits] [LLVMdev] [RFC] "noclone" function attribute

Chris Lattner clattner at apple.com
Fri Dec 14 15:18:28 PST 2012


On Dec 14, 2012, at 9:40 AM, James Molloy <James.Molloy at arm.com> wrote:
> Hi Chris,
> 
> Thanks for the review. Replying now instead of with an updated patch as
> I won't be able to get around to it until Monday.

Ok, no problem.

>> +        Assert1((*I)->cannotDuplicate(), "All functions which may transitively call a "
>> +                "noduplicate function must themselves be noduplicate!", &F);
>> 
>> This doesn't make a lot of sense to me to enforce.  Can you explain the intuition for this limitation?  In practice, this will be difficult to handle, because devirtualization (and other things) can turn an indirect call to a direct call… if that direct call has the wrong noduplicate sense, we will get bad things happening.
> 
> I can try. It all comes down to the reading of the spec and the spirit
> of the spec, and "ambiguous" is a kind way to describe it…

This is what I was afraid of.  We're discussing here the semantics of "noduplicate", not the semantics of barrier.  "noduplicate" semantics are a big part of what it means to be a barrier, but barriers may have additional requirements on top of it.

The LLVM "noduplicate" concept is independent of barrier, and should not have this transitive property.

-Chris






More information about the llvm-commits mailing list