diff options
author | Stefan Stipanovic <sstipanovic@s-energize.com> | 2019-07-11 21:37:40 +0000 |
---|---|---|
committer | Stefan Stipanovic <sstipanovic@s-energize.com> | 2019-07-11 21:37:40 +0000 |
commit | 0626367202ced4ab46410c15357eed0ad8be6d5c (patch) | |
tree | b501bcd56eabe89658e19db7b4497adc58b313e5 /llvm/docs | |
parent | 7d2019bb961f94eec476f255bb776d470ecd1b49 (diff) | |
download | bcm5719-llvm-0626367202ced4ab46410c15357eed0ad8be6d5c.tar.gz bcm5719-llvm-0626367202ced4ab46410c15357eed0ad8be6d5c.zip |
[Attributor] Deduce "nosync" function attribute.
Introduce and deduce "nosync" function attribute to indicate that a function
does not synchronize with another thread in a way that other thread might free memory.
Reviewers: jdoerfert, jfb, nhaehnle, arsenm
Subscribers: wdng, hfinkel, nhaenhle, mehdi_amini, steven_wu,
dexonsmith, arsenm, uenoku, hiraditya, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D62766
llvm-svn: 365830
Diffstat (limited to 'llvm/docs')
-rw-r--r-- | llvm/docs/LangRef.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index f98aa6270bb..0bac9e7c5f9 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -1493,6 +1493,16 @@ example: Annotated functions may still raise an exception, i.a., ``nounwind`` is not implied. If an invocation of an annotated function does not return control back to a point in the call stack, the behavior is undefined. +``nosync`` + This function attribute indicates that the function does not communicate + (synchronize) with another thread through memory or other well-defined means. + Synchronization is considered possible in the presence of `atomic` accesses + that enforce an order, thus not "unordered" and "monotonic", `volatile` accesses, + as well as `convergent` function calls. Note that through `convergent` function calls + non-memory communication, e.g., cross-lane operations, are possible and are also + considered synchronization. However `convergent` does not contradict `nosync`. + If an annotated function does ever synchronize with another thread, + the behavior is undefined. ``nounwind`` This function attribute indicates that the function never raises an exception. If the function does raise an exception, its runtime |