I plan to use that to optimize mask creation in VPlan predicator by `or`ing edge masks from the post-dominance frontier instead of all predecessors in a subsequent patch. Note that it would require to use the same unmodified post-dom tree for *all* the basic blocks in a VPlan that is already limited to a particular loopnest so the algorithmic complexity concerns behind the "deprecation" notice in the beggining of `DominanceFrontier.h` (and also discussion in the https://discourse.llvm.org/t/dominance-frontiers/21755 thread) don't apply for my use case (at least to the best of my understanding). The change here is to properly use graph-traits for children traversal plus inline `ForwardDominanceFrontierBase` into `DominanceFrontierBase` now that it's used for post-dom-frontier. Since the only planned use-case is in the vectorizer, I'm adding a VPlan-base unittest along with this change. Support for multiple root nodes via using virtual root node to seed the worklist is left to a subsequent PR.
2.5 KiB
2.5 KiB