[llvm] [RFC][GlobalISel] Use Builders in MatchTable (PR #65955)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 22 03:34:46 PDT 2023


================
@@ -901,6 +920,7 @@ bool GIMatchTableExecutor::executeMatchTable(
       OutMIs[NewInsnID] = MachineInstrBuilder(*State.MIs[OldInsnID]->getMF(),
                                               State.MIs[OldInsnID]);
       OutMIs[NewInsnID]->setDesc(TII.get(NewOpcode));
+      MTObserver.CreatedInsts.insert(OutMIs[NewInsnID]);
----------------
qcolombet wrote:

I think I'm nitpicking, but technically we are changing `OldInsnID`, so shouldn't we wrap the whole sequence in `changingInstr ` / `changedInstr`?

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


More information about the llvm-commits mailing list