[PATCH] D86233: [LangRef] Define mustprogress attribute

Atmn Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 10:35:58 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1e55cf77f389: [LangRef] Define mustprogress attribute (authored by adpatel6, committed by atmnpatel).

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
@@ -1958,6 +1958,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.299101.patch
Type: text/x-patch
Size: 3617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201019/794c8fc5/attachment.bin>


More information about the llvm-commits mailing list