Skip to content

Conversation

@lenary
Copy link
Member

@lenary lenary commented Oct 15, 2025

This PR:

  • Adds a [[clang::nooutline]] function attribute for C and C++. There
    is no equivalent GNU syntax for this attribute, so no __attribute__
    syntax.
  • Uses the presence of [[clang::nooutline]] to add the nooutline
    attribute to IR function definitions.
  • Turns the "nooutline" attribute into an enum attribute (without
    quotes), and adds an auto-upgrader for bitcode to make that same
    change to existing IR.
  • Adds test for the above.

The attribute is capable of disabling both the Machine Outliner (enabled
at Oz for some targets), and the IR Outliner (disabled by default).

Copy link
Member Author

lenary commented Oct 15, 2025

This PR:
- Adds a `[[clang::nooutline]]` function attribute for C and C++. There
  is no equivalent GNU syntax for this attribute, so no `__attribute__`
  syntax.
- Uses the presence of `[[clang::nooutline]]` to add the `nooutline`
  attribute to IR function definitions.
- Turns the `"nooutline"` attribute into an enum attribute (without
  quotes), and adds an auto-upgrader for bitcode to make that same
  change to existing IR.
- Adds test for the above.

The attribute is capable of disabling both the Machine Outliner (enabled
at Oz for some targets), and the IR Outliner (disabled by default).
@lenary lenary force-pushed the users/lenary/clang-add-nooutline-attr branch from 19afc83 to 31c8669 Compare October 15, 2025 21:20
@lenary lenary closed this Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants