[llvm] [AMDGPU] Clear dbg info on CFG intrinsic due to incorrect behaviour in gdb. (PR #83010)
Emma Pilkington via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 08:23:03 PST 2024
================
@@ -336,8 +342,9 @@ bool SIAnnotateControlFlow::closeControlFlow(BasicBlock *BB) {
// Split edge to make Def dominate Use
FirstInsertionPt = SplitEdge(DefBB, BB, DT, LI)->getFirstInsertionPt();
}
- IRBuilder<>(FirstInsertionPt->getParent(), FirstInsertionPt)
- .CreateCall(EndCf, {Exec});
+ IRBuilder<> IRB(FirstInsertionPt->getParent(), FirstInsertionPt);
+ IRB.SetCurrentDebugLocation(DebugLoc());
----------------
epilk wrote:
This is the only DebugLoc that is causing GDB test failures, where control flow joins in the 'Flow' block. Could you remove the other changes in this PR? I think the other debug locations should all be correct.
A comment might be nice here too, maybe something like: "StructurizeCFG 'Flow' blocks have debug locations from the condition, for now just avoid copying these DebugLocs so that stepping out of the then/else block in a debugger doesn't step to the condition."?
https://github.com/llvm/llvm-project/pull/83010
More information about the llvm-commits
mailing list