[PATCH] D129413: [InstrProf] Allow compiler generated functions in SCL
Ellis Hoag via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 11 10:59:36 PDT 2022
ellis added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3894-3896
+ if (getCodeGenOpts().getProfileInstr() != CodeGenOptions::ProfileNone)
+ if (isProfileInstrExcluded(F, SourceLocation()))
+ F->addFnAttr(llvm::Attribute::NoProfile);
----------------
phosek wrote:
> Do we still need https://github.com/llvm/llvm-project/blob/759e5e0096f650515799805828f9ac5b7d4a7303/clang/lib/CodeGen/CodeGenFunction.cpp#L856 if we set the attribute here?
Both are needed. Here the attribute is added in `GetOrCreateLLVMFunction()` which I believe only creates compiler generated functions. Where you linked is called when normal functions are generated.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129413/new/
https://reviews.llvm.org/D129413
More information about the cfe-commits
mailing list