[clang] [clang][DebugInfo] Attach `DISubprogram` to additional call variants (PR #166202)
Orlando Cazalet-Hyams via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 7 04:41:23 PST 2025
================
@@ -6277,6 +6277,21 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
pushDestroy(QualType::DK_nontrivial_c_struct, Ret.getAggregateAddress(),
RetTy);
+ if (CalleeDecl) {
+ // Generate function declaration DISuprogram in order to be used
+ // in debug info about call sites.
+ if (CGDebugInfo *DI = getDebugInfo()) {
+ CodeGenFunction CalleeCGF(CGM);
----------------
OCHyams wrote:
Hmm that is not nothing, while I'm inclined to agree that the previous behaviour was unintended (and you're essentially fixing a bug/mistake) I also think that the status quo has carries weight.
The instructions:u regression at O0 is more significant than that thought, it's 0.03-0.34%. I wonder if there's something we can do about that? I believe we don't emit call site information for O0 builds anyway, so that extra cost is potentially redundant?
https://github.com/llvm/llvm-project/pull/166202
More information about the cfe-commits
mailing list