[PATCH] D103717: [InstrProfiling][ELF] Make __profd_ private if the function does not use value profiling

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 18 13:46:30 PDT 2021


MaskRay added inline comments.


================
Comment at: llvm/test/Transforms/PGOProfile/indirect_call_profile.ll:57
 ; Test that comdat function's address is recorded.
-; LOWER: @__profd_foo3.[[FOO3_HASH:[0-9]+]] = linkonce_odr{{.*}}@__profc_foo3.[[FOO3_HASH]]
+; LOWER: @__profd_foo3.[[FOO3_HASH:[0-9]+]] = private {{.*}} @__profc_foo3.[[FOO3_HASH]]
 ; Function Attrs: nounwind uwtable
----------------
rnk wrote:
> I don't think we need to append hashes to symbols if they will ultimately be private. Seems like future work, though.
It doesn't. `__profd_foo3.[[FOO3_HASH:[0-9]+]]` has no harm because such a private linkage variable will not need a symbol table entry.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103717/new/

https://reviews.llvm.org/D103717



More information about the llvm-commits mailing list