[PATCH] D108581: [CSPGO] Fix lost IRPGOFlag in CSPGO instrumentation

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 23 16:58:57 PDT 2021


xur marked 3 inline comments as done.
xur added a comment.

In D108581#2961321 <https://reviews.llvm.org/D108581#2961321>, @MaskRay wrote:

> Thanks for the patch. `llvm.compiler.used` does look better to me.
>
> ---
>
>> This happens in the module where IRPGOFlag is mard as non-prevailing
>
> marked

Fixed

>> This is still problematic because we currently query this symbol to coordinate some actions B/W PGOInstrumentation and InstroProfiling lowering, like whether to do value profiling, weather to do comdat renaming.
>
> Worth clarifying B/W.
>
>> InstruProfling
>
> InstrProfiling

Fixed

> ---
>
> I have confirmed that
>
> In regular LTO, the non-prevailing variable is dropped unless its linkage weak_odr/linkonce_odr && `-compute-dead=0`
> In ThinLTO, the variable is changed to available_external linkage by `thinLTOResolvePrevailingGUID` then dropped by GlobleOpt:deleteIfDead in the backend.

Thanks for confirming and put the conditions here

> Does it make sense to update `thinlto_cspgo_gen.ll` as well?

That's a good idea. I will change that test too.


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

https://reviews.llvm.org/D108581



More information about the llvm-commits mailing list