[llvm] [Support][NFC] Use DomTreeBase methods in SemiNCA (PR #101059)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 29 12:36:21 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))
----------------
nikic wrote:
I don't really see how the insertion side effect here could be important. And the original commit https://github.com/llvm/llvm-project/commit/daef1bcfbbf3718411a4a7b97cd4c690122823b9 doesn't say either.
I think there might have been some confusion here and what's actually important is not the insertion side effect, but that both `DT.DomTreeNodes.contains(W)` *and* `DT.DomTreeNodes[W] != nullptr`, rather than just the former.
https://github.com/llvm/llvm-project/pull/101059
More information about the llvm-commits
mailing list