[llvm] [SandboxIR][Tracker] Track Instruction::removeFromParent() (PR #99541)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 13:11:53 PDT 2024


================
@@ -135,6 +136,26 @@ class EraseFromParent : public IRChangeBase {
 #endif
 };
 
+class RemoveFromParent : public IRChangeBase {
+  /// The instruction that is about to get removed.
+  Instruction *RemovedI = nullptr;
+  /// This is either the next instr, or the parent BB if at the end of the BB.
+  PointerUnion<Instruction *, BasicBlock *> NextInstrOrBB;
----------------
aeubanks wrote:

maybe a helper typedef and function would be useful if this is used in a lot of `IRChangeBase`s

https://github.com/llvm/llvm-project/pull/99541


More information about the llvm-commits mailing list