[clang] [clang][DebugInfo] Attach `DISubprogram` to additional call variants (PR #166202)

J. Ryan Stinnett via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 6 09:10:20 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);
----------------
jryans wrote:

The compiler time tracker [results](https://llvm-compile-time-tracker.com/compare.php?from=34a34888152388c91dd66c10eefd600b3200e779&to=919d777096d5a75383976a8613088abcc45efe42&stat=instructions:u) are in.

The builds with debug info do show a geometric mean increase in the range of 0.02 - 0.14%. We are emitting more info various kinds of function calls, so an increase of this size seems within reason to me.

I'll wait until (at least) tomorrow to merge in case further discussion is needed.

https://github.com/llvm/llvm-project/pull/166202


More information about the cfe-commits mailing list