[llvm] [ctx_prof] Fix the pre-thinlink "use" case (PR #102511)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 12:39:28 PDT 2024


================
@@ -7,19 +7,22 @@
 
 declare void @bar()
 
+;.
+; CHECK: @__profn_foo = private constant [3 x i8] c"foo"
+;.
 define void @foo(i32 %a, ptr %fct) {
 ; CHECK-LABEL: define void @foo(
 ; CHECK-SAME: i32 [[A:%.*]], ptr [[FCT:%.*]]) local_unnamed_addr {
+; CHECK-NEXT:    call void @llvm.instrprof.increment(ptr @__profn_foo, i64 728453322856651412, i32 2, i32 0)
----------------
snehasish wrote:

Why did this get hoisted out from the `no:` block? The only functional change I could find in this patch was `addLTOPrelinkPasses(MPM)` which adds `CanonicalizeAliasesPass` and `NameAnonGlobalPass`. 

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


More information about the llvm-commits mailing list