summaryrefslogtreecommitdiffstats
path: root/llvm/docs
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2017-04-28 20:25:27 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2017-04-28 20:25:27 +0000
commitb19b57ea60da58d81c4af03a7ef2a1dd6a640267 (patch)
tree316220d5be2377b1456f2263960e67b6b11a5ed2 /llvm/docs
parent744c215e2958c13854c1d730a323132ce2dc9c57 (diff)
downloadbcm5719-llvm-b19b57ea60da58d81c4af03a7ef2a1dd6a640267.tar.gz
bcm5719-llvm-b19b57ea60da58d81c4af03a7ef2a1dd6a640267.zip
Add speculatable function attribute
This attribute tells the optimizer that the function may be speculated. Patch by Tom Stellard llvm-svn: 301680
Diffstat (limited to 'llvm/docs')
-rw-r--r--llvm/docs/LangRef.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index b0a31589cc4..bf4973ca9ae 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -1535,6 +1535,17 @@ example:
``sanitize_thread``
This attribute indicates that ThreadSanitizer checks
(dynamic thread safety analysis) are enabled for this function.
+``speculatable``
+ This function attribute indicates that the function does not have any
+ effects besides calculating its result and does not have undefined behavior.
+ Note that ``speculatable`` is not enough to conclude that along any
+ particular exection path the number of calls to this function will not be
+ externally observable. This attribute is only valid on functions
+ and declarations, not on individual call sites. If a function is
+ incorrectly marked as speculatable and really does exhibit
+ undefined behavior, the undefined behavior may be observed even
+ if the call site is dead code.
+
``ssp``
This attribute indicates that the function should emit a stack
smashing protector. It is in the form of a "canary" --- a random value
OpenPOWER on IntegriCloud