[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 17:37:14 PDT 2021
xur marked 3 inline comments as done.
xur added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:468
createProfileFileNameVar(M, InstrProfileOutput);
- createIRLevelProfileFlagVar(M, /* IsCS */ true, PGOInstrumentEntry);
+ appendToCompilerUsed(
+ M, createIRLevelProfileFlagVar(M, /* IsCS */ true, PGOInstrumentEntry));
----------------
MaskRay wrote:
> Add a comment like:
>
> The variable in a comdat may be discarded by LTO. Ensure the declaration will be retained.
>
> This raises the question: Is llvm.compiler.used allowed to reference a declaration (previously a non-prevailing definition due to comdat selection)? ISTM this should be allowed.
comment added.
For the question:
At the time of appending to llvm.compiler.used, this is a definition (not a decl). I don't see any problem add it to the list.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108581/new/
https://reviews.llvm.org/D108581
More information about the llvm-commits
mailing list