[llvm] [DebugInfo] Add DILayerLoc/DILayerLocList and DILocation irlayers operand (PR #215666)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 17:52:36 PDT 2026
================
@@ -109,17 +114,22 @@ DebugLoc DebugLoc::replaceInlinedAtSubprogram(
DILocation *LocToUpdate = LocChain.pop_back_val();
DIScope *NewScope = DILocalScope::cloneScopeForSubprogram(
*LocToUpdate->getScope(), NewSP, Ctx, Cache);
- UpdatedLoc = DILocation::get(Ctx, LocToUpdate->getLine(),
- LocToUpdate->getColumn(), NewScope);
+ UpdatedLoc = DILocation::get(
+ Ctx, LocToUpdate->getLine(), LocToUpdate->getColumn(), NewScope,
+ /*InlinedAt=*/nullptr, /*ImplicitCode=*/false, /*AtomGroup=*/0,
+ /*AtomRank=*/0, LocToUpdate->getRawIRLayers());
----------------
ayermolo wrote:
Yep! You were right.
During cold splitting if inlined instruction came from a DISubprogram with keyInstruction sets and then gets outlined into cold function, it's scope still points to the original DISubprogram with that flag set, but the atom stuff is dropped. So then no is_stmt is set. (Followup bug report)?
The irlayers should still be preserved I think, so that profiler (and user cares about cold code) can look at assembly in cold sections and point to intermediate location it came from.
https://github.com/llvm/llvm-project/pull/215666
More information about the llvm-commits
mailing list