Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Clang] Fill in documentation gaps for some attributes #68967

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

SLTozer
Copy link
Contributor

@SLTozer SLTozer commented Oct 13, 2023

This patch adds some missing documentation for some attributes in BitCodeFormat, where the integer code mappings for attributes after code 79 were not listed, and in LangRef where the incompatibility between minsize/optsize and optnone was not mentioned.

This patch adds some missing documentation for some attributes in
BitCodeFormat, where the integer code mappings for attributes after
code 79 were not listed, and in LangRef where the incompatibility
between minsize/optsize and optnone was not mentioned.
@llvmbot
Copy link

llvmbot commented Oct 13, 2023

@llvm/pr-subscribers-llvm-ir

Author: Stephen Tozer (SLTozer)

Changes

This patch adds some missing documentation for some attributes in BitCodeFormat, where the integer code mappings for attributes after code 79 were not listed, and in LangRef where the incompatibility between minsize/optsize and optnone was not mentioned.


Full diff: https://github.com/llvm/llvm-project/pull/68967.diff

2 Files Affected:

  • (modified) llvm/docs/BitCodeFormat.rst (+8)
  • (modified) llvm/docs/LangRef.rst (+2)
diff --git a/llvm/docs/BitCodeFormat.rst b/llvm/docs/BitCodeFormat.rst
index 70be73abef19d6d..db913f59d691d71 100644
--- a/llvm/docs/BitCodeFormat.rst
+++ b/llvm/docs/BitCodeFormat.rst
@@ -1085,6 +1085,14 @@ The integer codes are mapped to well-known attributes as follows.
 * code 77: ``elementtype``
 * code 78: ``disable_sanitizer_instrumentation``
 * code 79: ``nosanitize_bounds``
+* code 80: ``allocalign``
+* code 81: ``allocptr``
+* code 82: ``allockind``
+* code 83: ``presplitcoroutine``
+* code 84: ``fn_ret_thunk_extern``
+* code 85: ``skipprofile``
+* code 86: ``memory``
+* code 87: ``nofpclass``
 
 .. note::
   The ``allocsize`` attribute has a special encoding for its arguments. Its two
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index f542e70bcfee810..f84a86e06e734ba 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -1872,6 +1872,7 @@ example:
     passes make choices that keep the code size of this function as small
     as possible and perform optimizations that may sacrifice runtime
     performance in order to minimize the size of the generated code.
+    This attribute is incompatible with the ``optnone`` attribute.
 ``naked``
     This attribute disables prologue / epilogue emission for the
     function. This can have very system-specific consequences.
@@ -2044,6 +2045,7 @@ example:
     passes make choices that keep the code size of this function low,
     and otherwise do optimizations specifically to reduce code size as
     long as they do not significantly impact runtime performance.
+    This attribute is incompatible with the ``optnone`` attribute.
 ``"patchable-function"``
     This attribute tells the code generator that the code
     generated for this function needs to follow certain conventions that

Copy link
Member

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for extracting this to a separate review. 😄

@SLTozer SLTozer merged commit 178619d into llvm:main Oct 18, 2023
3 of 4 checks passed
@SLTozer SLTozer deleted the el0-attr-doc-cleanups branch October 18, 2023 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants