[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

Zequan Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 18 14:11:07 PDT 2023


================
@@ -0,0 +1,11 @@
+; RUN: opt < %s -passes=instrprof -profile-correlate=binary -S | FileCheck %s
+
+; CHECK: @__profd_foo = private global { i64, i64, i64, ptr, ptr, i32, [2 x i16] } { i64 {{.*}}, i64 {{.*}}, i64 ptrtoint (ptr @__profc_foo to i64)
----------------
ZequanWu wrote:

Though the CounterPtr's type (3rd argument) is i64, not ptr, I found that when lowered to assembly, it is just the address of the counter label. I guess it's fine.

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


More information about the cfe-commits mailing list