[PATCH] D86233: [WIP] [RFC] [LangRef] Define noprogress attribute

Atmn Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 10:51:45 PDT 2020


atmnpatel created this revision.
atmnpatel added reviewers: jdoerfert, efriedma, spatel, nlopes, aqjune, RalfJung.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
atmnpatel requested review of this revision.

The ``noprogress`` function attribute will allow us to more aggressively optimize functions that do not make progress. The name of this attribute is still under discussion, and an alternative will probably be chosen depending on the discussion over this patch, some of the ongoing discussion is in D85393. The alternatives proposed so far are: ``maybenoprogress``, and if we invert the attribute, ``progress``, ``maybeprogress``, depending on the exact semantics.

Unlike some of the attributes, ``noprogress`` does not transitively apply to callees. This is so we can provide more granularity. The other alternative of applying this function transitively could require changing the default assumption that functions will make progress, which could cause a regression in performance, and we would additionally also lose the finer control. We also may need to add loop-metadata.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86233

Files:
  llvm/docs/LangRef.rst


Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -1953,6 +1953,11 @@
     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.
+``noprogress``
+    This attribute indicates that the function is guaranteed to not make
+    progress, however callee functions may still make progress if they are not
+    marked ``noprogress``. The absense of this attribute does not guarantee
+    progress.
 
 Call Site Attributes
 ----------------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86233.286612.patch
Type: text/x-patch
Size: 668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200819/c5621a05/attachment.bin>


More information about the llvm-commits mailing list