llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[DebugInfo][SCCPSolver] Missing debug location updates

Open svs-quic opened this issue 2 years ago • 1 comments

The functions replaceSignedInst() and removeNonFeasibleEdges() do not propagate the debug locations to the newly created instructions.

// Wire up the new instruction and update state.
assert(NewInst && "Expected replacement instruction");
NewInst->takeName(&Inst);
InsertedValues.insert(NewInst);
Inst.replaceAllUsesWith(NewInst);
Solver.removeLatticeValueFor(&Inst);
Inst.eraseFromParent();
BranchInst::Create(OnlyFeasibleSuccessor, BB);
TI->eraseFromParent();

svs-quic avatar Jul 15 '24 09:07 svs-quic

@llvm/issue-subscribers-debuginfo

Author: Sudharsan Veeravalli (svs-quic)

The functions replaceSignedInst() and removeNonFeasibleEdges() do not propagate the debug locations to the newly created instructions.
// Wire up the new instruction and update state.
assert(NewInst && "Expected replacement instruction");
NewInst->takeName(&Inst);
InsertedValues.insert(NewInst);
Inst.replaceAllUsesWith(NewInst);
Solver.removeLatticeValueFor(&Inst);
Inst.eraseFromParent();
BranchInst::Create(OnlyFeasibleSuccessor, BB);
TI->eraseFromParent();

llvmbot avatar Jul 15 '24 14:07 llvmbot