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

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 13:50:23 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 still analyze this function, transform its body,
----------------
jhuber6 wrote:

Agreed, but this is existing behavior so it'd probably need wider discussion. My *guess* would be that IPO should be able to make optimizations based off of what is inside an `optnone` function, but not alter it itself.

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


More information about the llvm-commits mailing list