[llvm] [CodeGen] Remove unused InstructionMoveBefore (NFC) (PR #227586)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 00:09:25 PDT 2026
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/227586
The last use was removed on December 15, 2023 in commit
163aeca33d4adb97e8599584409457ca14b1419b.
Assisted-by: Antigravity
>From df119e0592693355a20d4d51c4bb07c617526e40 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 29 Sep 2026 23:57:02 -0700
Subject: [PATCH] [CodeGen] Remove unused InstructionMoveBefore (NFC)
The last use was removed on December 15, 2023 in commit
163aeca33d4adb97e8599584409457ca14b1419b.
Assisted-by: Antigravity
---
llvm/lib/CodeGen/CodeGenPrepare.cpp | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index d554a32a5d3ae..cc66634c01bdd 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -3459,27 +3459,6 @@ class TypePromotionTransaction {
}
};
- /// Move an instruction before another.
- class InstructionMoveBefore : public TypePromotionAction {
- /// Original position of the instruction.
- InsertionHandler Position;
-
- public:
- /// Move \p Inst before \p Before.
- InstructionMoveBefore(Instruction *Inst, BasicBlock::iterator Before)
- : TypePromotionAction(Inst), Position(Inst) {
- LLVM_DEBUG(dbgs() << "Do: move: " << *Inst << "\nbefore: " << *Before
- << "\n");
- Inst->moveBefore(Before);
- }
-
- /// Move the instruction back to its original position.
- void undo() override {
- LLVM_DEBUG(dbgs() << "Undo: moveBefore: " << *Inst << "\n");
- Position.insert(Inst);
- }
- };
-
/// Set the operand of an instruction with a new value.
class OperandSetter : public TypePromotionAction {
/// Original operand of the instruction.
More information about the llvm-commits
mailing list