[llvm] [ctx_prof] Add Inlining support (PR #106154)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 21:17:36 PDT 2024


================
@@ -0,0 +1,101 @@
+; RUN: rm -rf %t
+; RUN: split-file %s %t
+; RUN: llvm-ctxprof-util fromJSON --input=%t/profile.json --output=%t/profile.ctxprofdata
+
+; RUN: opt -passes='module-inline,print<ctx-prof-analysis>' %t/module.ll -S \
+; RUN:   -use-ctx-profile=%t/profile.ctxprofdata -ctx-profile-printer-level=json \
+; RUN:   -o - 2> %t/profile-final.txt | FileCheck %s
+; RUN: %python %S/json_equals.py %t/profile-final.txt %t/expected.json
+
+; CHECK-LABEL: @entrypoint
+; CHECK-LABEL: yes:
+; CHECK:         call void @llvm.instrprof.increment(ptr @entrypoint, i64 0, i32 3, i32 1)
----------------
minglotus-6 wrote:

Naive question, is it intended that `llvm.instrprof.increment` [intrinsic](https://llvm.org/docs/LangRef.html#llvm-instrprof-increment-intrinsic) is present in a ctx profile use IR?

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


More information about the llvm-commits mailing list