[llvm] MemProf: Add minimum count threshold for inlining of promoted calls (PR #148001)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 10 12:50:21 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 \
----------------
snehasish wrote:

The synthetic values are using 1, so a threshold of 2 should be sufficient with a strict < check?

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


More information about the llvm-commits mailing list