diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2023-07-03 18:08:48 +0100 |
---|---|---|
committer | Jeremy Morse <jeremy.morse@sony.com> | 2023-11-30 15:29:05 +0000 |
commit | 3ef98bcd46f22d1d25f9f83f5742209f87d399d0 (patch) | |
tree | 9c6e3983d0c9defb872aaca7f5188037fa9f885b /llvm/lib/IR/BasicBlock.cpp | |
parent | 73d9f5fda6648a9c75a265524da29bac061fb155 (diff) | |
download | llvm-3ef98bcd46f22d1d25f9f83f5742209f87d399d0.zip llvm-3ef98bcd46f22d1d25f9f83f5742209f87d399d0.tar.gz llvm-3ef98bcd46f22d1d25f9f83f5742209f87d399d0.tar.bz2 |
[DebugInfo][RemoveDIs] Support maintaining DPValues in CodeGenPrepare (#73660)
CodeGenPrepare needs to support the maintenence of DPValues, the
non-instruction replacement for dbg.value intrinsics. This means there are
a few functions we need to duplicate or replicate the functionality of:
* fixupDbgValue for setting users of sunk addr GEPs,
* The remains of placeDbgValues needs a DPValue implementation for sinking
* Rollback of RAUWs needs to update DPValues
* Rollback of instruction removal needs supporting (see github #73350)
* A few places where we have to use iterators rather than instructions.
There are three places where we have to use the setHeadBit call on
iterators to indicate which portion of debug-info records we're about to
splice around. This is because CodeGenPrepare, unlike other optimisation
passes, is very much concerned with which block an operation occurs in and
where in the block instructions are because it's preparing things to be in
a format that's good for SelectionDAG.
There isn't a large amount of test coverage for debuginfo behaviours in
this pass, hence I've added some more.
Diffstat (limited to 'llvm/lib/IR/BasicBlock.cpp')
-rw-r--r-- | llvm/lib/IR/BasicBlock.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp index 82868fb..0a8fddb 100644 --- a/llvm/lib/IR/BasicBlock.cpp +++ b/llvm/lib/IR/BasicBlock.cpp @@ -617,7 +617,7 @@ BasicBlock *BasicBlock::splitBasicBlock(iterator I, const Twine &BBName, this->getNextNode()); // Save DebugLoc of split point before invalidating iterator. - DebugLoc Loc = I->getDebugLoc(); + DebugLoc Loc = I->getStableDebugLoc(); // Move all of the specified instructions from the original basic block into // the new basic block. New->splice(New->end(), this, I, end()); |