[llvm] [DominanceFrontier] Support multiple root nodes for post-dom (PR #181257)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 04:44:34 PST 2026
================
@@ -90,13 +95,16 @@ void DominanceFrontierBase<BlockT, IsPostDom>::calculate(
BlockT *parentBB = currentW->parentBB;
const DomTreeNodeT *currentNode = currentW->Node;
const DomTreeNodeT *parentNode = currentW->parentNode;
- assert(currentBB && "Invalid work object. Missing current Basic Block");
assert(currentNode && "Invalid work object. Missing current Node");
- DomSetType &S = this->Frontiers[currentBB];
+
+ // Note that for `IsPostDom == true`, virtual root node (empty currentBB)
----------------
lukel97 wrote:
Nit
```suggestion
// Note that for `IsPostDom == true`, the virtual root node (null currentBB)
```
https://github.com/llvm/llvm-project/pull/181257
More information about the llvm-commits
mailing list