[PATCH] D86233: [LangRef] Define mustprogress attribute
Atmn Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 8 17:48:34 PDT 2020
atmnpatel updated this revision to Diff 297089.
atmnpatel added a comment.
Rebase to fix buildkite build.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86233/new/
https://reviews.llvm.org/D86233
Files:
llvm/docs/LangRef.rst
llvm/utils/emacs/llvm-mode.el
llvm/utils/kate/llvm.xml
llvm/utils/llvm.grm
llvm/utils/vim/syntax/llvm.vim
llvm/utils/vscode/llvm/syntaxes/ll.tmLanguage.yaml
Index: llvm/utils/vscode/llvm/syntaxes/ll.tmLanguage.yaml
===================================================================
--- llvm/utils/vscode/llvm/syntaxes/ll.tmLanguage.yaml
+++ llvm/utils/vscode/llvm/syntaxes/ll.tmLanguage.yaml
@@ -204,6 +204,7 @@
\\bmodule\\b|\
\\bmonotonic\\b|\
\\bmsp430_intrcc\\b|\
+ \\bmustprogress\\b|\
\\bmusttail\\b|\
\\bnaked\\b|\
\\bnest\\b|\
Index: llvm/utils/vim/syntax/llvm.vim
===================================================================
--- llvm/utils/vim/syntax/llvm.vim
+++ llvm/utils/vim/syntax/llvm.vim
@@ -107,6 +107,7 @@
\ module
\ monotonic
\ msp430_intrcc
+ \ mustprogress
\ musttail
\ naked
\ nest
Index: llvm/utils/llvm.grm
===================================================================
--- llvm/utils/llvm.grm
+++ llvm/utils/llvm.grm
@@ -175,6 +175,7 @@
| sanitize_address
| sanitize_thread
| sanitize_memory
+ | mustprogress
;
OptFuncAttrs ::= + _ | OptFuncAttrs FuncAttr ;
Index: llvm/utils/kate/llvm.xml
===================================================================
--- llvm/utils/kate/llvm.xml
+++ llvm/utils/kate/llvm.xml
@@ -81,6 +81,7 @@
<item> argmemonly </item>
<item> convergent </item>
<item> inlinehint </item>
+ <item> mustprogress </item>
<item> naked </item>
<item> nobuiltin </item>
<item> noimplicitfloat </item>
Index: llvm/utils/emacs/llvm-mode.el
===================================================================
--- llvm/utils/emacs/llvm-mode.el
+++ llvm/utils/emacs/llvm-mode.el
@@ -23,7 +23,7 @@
;; Attributes
`(,(regexp-opt
'("alwaysinline" "argmemonly" "builtin" "cold" "convergent" "inaccessiblememonly"
- "inaccessiblemem_or_argmemonly" "inlinehint" "jumptable" "minsize" "naked" "nobuiltin"
+ "inaccessiblemem_or_argmemonly" "inlinehint" "jumptable" "minsize" "mustprogress" "naked" "nobuiltin"
"noduplicate" "nofree" "noimplicitfloat" "noinline" "nonlazybind" "noredzone" "noreturn"
"norecurse" "noundef" "nounwind" "optnone" "optsize" "readnone" "readonly" "returns_twice"
"speculatable" "ssp" "sspreq" "sspstrong" "safestack" "sanitize_address" "sanitize_hwaddress" "sanitize_memtag"
Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -1954,6 +1954,18 @@
the function. The instrumentation checks that the return address for the
function has not changed between the function prolog and epilog. It is
currently x86_64-specific.
+``mustprogress``
+ This attribute indicates that the function is required to return, unwind,
+ or interact with the environment in an observable way e.g. via a volatile
+ memory access, I/O, or other synchronization. The ``mustprogress``
+ attribute is intended to model the requirements of the first section of
+ [intro.progress] of the C++ Standard. As a consequence, a loop in a
+ function with the `mustprogress` attribute can be assumed to terminate if
+ it does not interact with the environment in an observable way, and
+ terminating loops without side-effects can be removed. If a `mustprogress`
+ function does not satisfy this contract, the behavior is undefined. This
+ attribute does not apply transitively to callees, but does apply to call
+ sites within the function. Note that `willreturn` implies `mustprogress`.
Call Site Attributes
----------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86233.297089.patch
Type: text/x-patch
Size: 3617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201009/e210a6b6/attachment.bin>
More information about the llvm-commits
mailing list