[all-commits] [llvm/llvm-project] 0215f6: [DominanceFrontier] Support post-dominators on gra...

Andrei Elovikov via All-commits all-commits at lists.llvm.org
Wed Feb 11 12:50:03 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0215f6b6cf810d9ab6d02fc7bbec5c26ad4701ff
      https://github.com/llvm/llvm-project/commit/0215f6b6cf810d9ab6d02fc7bbec5c26ad4701ff
  Author: Andrei Elovikov <andrei.elovikov at sifive.com>
  Date:   2026-02-11 (Wed, 11 Feb 2026)

  Changed paths:
    M llvm/include/llvm/Analysis/DominanceFrontier.h
    M llvm/include/llvm/Analysis/DominanceFrontierImpl.h
    M llvm/include/llvm/CodeGen/MachineDominanceFrontier.h
    M llvm/lib/Analysis/DominanceFrontier.cpp
    M llvm/lib/CodeGen/MachineDominanceFrontier.cpp
    M llvm/unittests/Transforms/Vectorize/CMakeLists.txt
    A llvm/unittests/Transforms/Vectorize/VPPostDomFrontierTest.cpp

  Log Message:
  -----------
  [DominanceFrontier] Support post-dominators on graphs with single root (#179336)

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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list