[llvm] [SPIR-V] Cache PartialOrderingVisitor in Splitter instead of rebuilding per call (PR #211198)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 07:47:45 PDT 2026
================
@@ -313,12 +306,14 @@ class SPIRVStructurizerImpl {
LoopInfo &LI;
DomTreeBuilder::BBDomTree DT;
DomTreeBuilder::BBPostDomTree PDT;
+ std::optional<PartialOrderingVisitor> POV;
Splitter(Function &F, LoopInfo &LI) : F(F), LI(LI) { invalidate(); }
void invalidate() {
PDT.recalculate(F);
DT.recalculate(F);
----------------
jmmartinez wrote:
If you want to go deeper, `PartialOrderingVisitor` also has a `DominatorTree`. Maybe we can reuse that one and stop recomputing 2 dominator trees.
https://github.com/llvm/llvm-project/pull/211198
More information about the llvm-commits
mailing list