[llvm] [MachineBasicBlock] Fix use after free in SplitCriticalEdge (PR #68786)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 23:05:43 PDT 2023


================
@@ -156,12 +156,14 @@ void ilist_traits<MachineInstr>::addNodeToList(MachineInstr *N) {
   MachineFunction *MF = Parent->getParent();
   N->addRegOperandsToUseLists(MF->getRegInfo());
   MF->handleInsertion(*N);
+  Parent->noteInsertion(*N);
----------------
qcolombet wrote:

Actually do we need a MBB delegate here at all?

Put differently why isn't `MBBSplitCriticalEdgeDelegate` a `MachineFunction` delegate?

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


More information about the llvm-commits mailing list