[llvm] [Support][NFC] Use DomTreeBase methods in SemiNCA (PR #101059)
Jakub Kuderski via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 13:02:59 PDT 2024
================
@@ -586,7 +586,8 @@ struct SemiNCAInfo {
// Loop over all of the discovered blocks in the function...
for (NodePtr W : llvm::drop_begin(NumToNode)) {
// Don't replace this with 'count', the insertion side effect is important
- if (DT.DomTreeNodes[W]) continue; // Haven't calculated this node yet?
+ if (DT.getNode(W))
----------------
kuhar wrote:
WFIW, this refactor makes it less obvious whether `W` is inserted or not. If we do need the insertion, we should update the comment and make this explicit.
Otherwise +1 to what @nikic said above.
https://github.com/llvm/llvm-project/pull/101059
More information about the llvm-commits
mailing list