[llvm-dev] carries_dependency attribute
Alexandre Isoard via llvm-dev
llvm-dev at lists.llvm.org
Mon Mar 5 16:42:36 PST 2018
Hello,
I was wondering what is the semantic of the carries_dependency attribute.
On https://clang.llvm.org/docs/AttributeReference.html#carries-dependency
it says some suspicious things to me (but I am probably interpreting that
wrong, sorry about that):
> The carries_dependency attribute specifies dependency propagation into
> and out of functions.
>
Where can it be placed? (on function declaration and/or definition?)
What are its parameters? (none?)
> When specified on a function or Objective-C method, the carries_dependency
> attribute means that the return value carries a dependency out of the
> function, so that the implementation need not constrain ordering upon
> return from that function.
>
I was under the impression that a dependency was an ordering constraint we
want to enforce... What are we trying to say here?
> Implementations of the function and its caller may choose to preserve
> dependencies instead of emitting memory ordering instructions such as
> fences.
>
So, if that attribute is not here, we do not need to preserve dependencies
as long as we emit a memory ordering instruction?
> Note, this attribute does not change the meaning of the program, but may
> result in generation of more efficient code.
>
I am almost certain of missing something here, else it does not make
sense...
Help?
--
*Alexandre Isoard*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180305/f86626ba/attachment.html>
More information about the llvm-dev
mailing list