[clang] [llvm] [IR][IPO] Don't rewrite the signature of optnone functions (PR #211804)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 07:54:42 PDT 2026


================
@@ -2551,6 +2551,8 @@ fn -> other_fn -> other_fn ; fn is norecurse
 `optnone`
 :   This function attribute indicates that most optimization passes will skip
     this function, with the exception of interprocedural optimization passes.
+    Interprocedural passes may analyze this function, but will not change its
+    signature, calling convention, or parameter and return attributes.
----------------
jhuber6 wrote:

Okay, I double checked, and there actually are some passes that will mutate this, so this prehaps needs to be reworded. The intention of this PR is still to prevent signature mutation so that's a different, preexisting behavior.

https://github.com/llvm/llvm-project/pull/211804


More information about the cfe-commits mailing list