diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2023-09-07 18:28:21 +0100 |
---|---|---|
committer | Jeremy Morse <jeremy.morse@sony.com> | 2023-09-07 18:37:57 +0100 |
commit | 4427407a2936c5a569e3c403836144e275c47809 (patch) | |
tree | 9cb19042d198727d9fe6ad62a3da24d37f87af6f /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | 75c487602a8af130ec0aedf398e318cb57063f2d (diff) | |
download | llvm-4427407a2936c5a569e3c403836144e275c47809.zip llvm-4427407a2936c5a569e3c403836144e275c47809.tar.gz llvm-4427407a2936c5a569e3c403836144e275c47809.tar.bz2 |
[NFC][RemoveDIs] Create a new spelling of the moveBefore method
As outlined in my proposal of how to get rid of debug intrinsics, this
patch adds a moveBefore method that signals the caller /intends/ the order
of moved instructions is to stay the same. This semantic difference has an
effect on debug-info, as it signals whether debug-info needs to move with
instructions or not.
The patch just replaces a few calls to moveBefore with calls to
moveBeforePreserving -- and the latter just calls the former, so it's all
NFC right now. A future patch will add an implementation of
moveBeforePreserving that takes action to correctly preserve debug-info,
but that's tightly coupled with our non-instruction debug-info
representation that's still being reviewed.
[0] https://discourse.llvm.org/t/rfc-instruction-api-changes-needed-to-eliminate-debug-intrinsics-from-ir/68939
Differential Revision: https://reviews.llvm.org/D156369
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp index 7edb4e9..629062d8 100644 --- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -300,7 +300,7 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DomTreeUpdater *DTU, PredBB->back().eraseFromParent(); // Move terminator instruction. - PredBB->splice(PredBB->end(), BB); + BB->back().moveBeforePreserving(*PredBB, PredBB->end()); // Terminator may be a memory accessing instruction too. if (MSSAU) |