[PATCH] D111313: [AMDGPU] Preserve MachineDominatorTree in SILowerControlFlow

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 13:39:22 PDT 2021


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp:477
     SplitBB = MBB.splitAt(MI, /*UpdateLiveIns*/true, LIS);
+    if (MDT && SplitBB != &MBB) {
+      MachineDomTreeNode *MBBNode = (*MDT)[&MBB];
----------------
Incidentally, AMDGPU has a few passes that split MBBs, and they all have their own code to update dominators. It would be good to common this up. I also wonder if splitting an MBB should create a new MBB for the first half of the split, not the second half, because that would make the dominator update more efficient and trivially supported by MachineDominatorTree::splitBlock.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111313/new/

https://reviews.llvm.org/D111313



More information about the llvm-commits mailing list