[PATCH] D114383: [InstrProfiling] Add -runtime-counter-relocation=function mode
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 3 19:39:41 PST 2021
phosek accepted this revision.
phosek added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: compiler-rt/include/profile/InstrProfData.inc:668
#define INSTR_PROF_PROFILE_COUNTER_BIAS_VAR __llvm_profile_counter_bias
+#define INSTR_PROF_PROFILE_COUNTER_DYNAMIC_BIAS_FUNC __llvm_profile_get_counter_bias
----------------
I'd rename the macro to match the variable as well.
================
Comment at: llvm/test/Instrumentation/InstrProfiling/runtime-counter-relocation.ll:17
+; RELOCVAR-NEXT: %prof_counters_bias = load i64, i64* @__llvm_profile_counter_bias
+; RELOCFUNC-NEXT: %prof_counters_bias = call i64 @__llvm_profile_counter_dynamic_bias()
+; RELOC-NEXT: %1 = add i64 ptrtoint ([1 x i64]* @__profc_foo to i64), %prof_counters_bias
----------------
================
Comment at: llvm/test/Instrumentation/InstrProfiling/runtime-counter-relocation.ll:30
+
+; RELOCFUNC: declare i64 @__llvm_profile_counter_dynamic_bias()
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114383/new/
https://reviews.llvm.org/D114383
More information about the llvm-commits
mailing list