[llvm] [FuncAttrs][LTO] Relax norecurse attribute inference during postlink LTO (PR #158608)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 17 09:19:40 PDT 2025
================
@@ -0,0 +1,135 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --version 5
+; RUN: opt < %s -passes=norecurse-lto-inference -S | FileCheck %s
+
+; This test includes a call graph with a self recursive function.
+; The purpose of this is to check that norecurse is added to functions
+; which have a self-recursive function in the call-chain.
+; The call-chain in this test is as follows
+; main -> bob -> callee1 -> callee2 -> callee3 -> callee4 -> callee5
----------------
david-arm wrote:
I think you can probably move some of the intermediate callees (i.e. callee1 - callee3) between main and callee5 as they don't really add much value.
https://github.com/llvm/llvm-project/pull/158608
More information about the llvm-commits
mailing list