[clang] [clang] Add use-sample-profile attribute to thread-local wrapper (PR #245514)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 27 10:04:50 PST 2026
================
@@ -3258,6 +3258,14 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
B.addAttribute("stack-probe-size",
std::to_string(CodeGenOpts.StackProbeSize));
+ // Set the attribute here instead of CodeGenFunction::StartFunction. Some
+ // synthetic functions (e.g. Itanium TLS wrapper) bypass StartFunction,
+ // can also get it.
+ // Inliner pass requires that the caller and callee have the same sample
+ // profile attribute according to CompatRule in Attributes.td.
----------------
efriedma-quic wrote:
This comment doesn't really seem useful.
https://github.com/llvm/llvm-project/pull/245514
More information about the cfe-commits
mailing list