[llvm] [llvm] Add NCD search on Array of basic blocks (PR #119355)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 05:25:30 PST 2024


================
@@ -189,3 +189,19 @@ void MachineDominatorTree::applySplitCriticalEdges() const {
   NewBBs.clear();
   CriticalEdgesToSplit.clear();
 }
+
+MachineBasicBlock *MachineDominatorTree::findNearestCommonDominator(
+    ArrayRef<MachineBasicBlock *> Blocks) const {
+  assert(!Blocks.empty());
----------------
paperchalice wrote:

`assert` with error message if possible: https://llvm.org/docs/CodingStandards.html#id45

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


More information about the llvm-commits mailing list