[PATCH] D67579: [PGO] Use linkonce_odr linkage for __profd_ variables in comdat groups

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 16:18:24 PDT 2019


rnk added a comment.

In D67579#1670170 <https://reviews.llvm.org/D67579#1670170>, @xur wrote:

> LGTM.  Thanks for the fix!
>
> I wasn't sure why profd was set to internal when looking at PR41380 (as for ELF, all are linkonce_oda). But your description explained that.
>
> BTW, the intrinsic lowering happens before inline (I suppose you are talking the main IPA inline).


I see. It's unfortunately very hard to figure out how the pipeline works, only the new pass manager seems to support the -fdebug-pass-manager flag.

I guess they key thing is that the instrumentation happens in the frontend or in IR before inlining, and after inlining, functions can reference many different `__profc_` variables, some of which can be deduplicated.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67579





More information about the llvm-commits mailing list