[llvm] MemProf: Add minimum count threshold for inlining of promoted calls (PR #148001)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 10 12:56:33 PDT 2025
================
@@ -54,7 +54,40 @@
; RUN: -o %t.out 2>&1 | FileCheck %s --check-prefix=STATS \
; RUN: --check-prefix=REMARKS
-; RUN: llvm-dis %t.out.2.4.opt.bc -o - | FileCheck %s --check-prefix=IR
+; RUN: llvm-dis %t.out.2.4.opt.bc -o - | FileCheck %s --check-prefixes=IR,IR-INLINE
+
+;; Next, add a threshold to prevent inlining of the promoted calls which have
+;; count 2 (the default threshold of 2 means they are inlinable by default).
+; RUN: llvm-lto2 run %t/main.o %t/foo.o -enable-memprof-context-disambiguation \
+; RUN: -memprof-icp-noinline-threshold=3 \
----------------
teresajohnson wrote:
This is not a synthetic VP metadata. It has a count of 2, so by default it does not add noinline, as desired. I added the flag in here just to test that it works as intended.
https://github.com/llvm/llvm-project/pull/148001
More information about the llvm-commits
mailing list