[all-commits] [llvm/llvm-project] 89c0b1: [DomTree] Define the members calling the construct...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Sun Jul 26 19:31:33 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 89c0b16768b4b83d86e0aeda47df813274e6d2db
https://github.com/llvm/llvm-project/commit/89c0b16768b4b83d86e0aeda47df813274e6d2db
Author: Fangrui Song <i at maskray.me>
Date: 2026-07-27 (Mon, 27 Jul 2026)
Changed paths:
M llvm/include/llvm/IR/Dominators.h
M llvm/include/llvm/Support/GenericDomTree.h
M llvm/include/llvm/Support/GenericDomTreeConstruction.h
M llvm/lib/IR/Dominators.cpp
M llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
M llvm/unittests/Support/GenericDomTreeTest.cpp
Log Message:
-----------
[DomTree] Define the members calling the construction algorithms out of line. NFC (#212145)
DominatorTreeBase defines some functions that call into into
DomTreeBuilder, whose algorithms live in GenericDomTreeConstruction.h.
A translation unit including only GenericDomTree.h inlines the member
and calls the algorithm, which just Dominators.cpp provides, through ten
explicit instantiations. Elsewhere the algorithm survives only where the
inliner leaves a use of it.
A previous revision of #212098 gave LoopInfoBase a member calling
recalculate, so instantiating LoopInfoBase in CFGLoopInfo.cpp referenced
an algorithm that no translation unit defines:
```
ld.lld: error: undefined symbol: void llvm::DomTreeBuilder::Calculate<llvm::DominatorTreeBase<mlir::Block, false>>(llvm::DominatorTreeBase<mlir::Block, false>&)
>>> referenced by CFGLoopInfo.cpp
```
Define those members in GenericDomTreeConstruction.h. Such a caller then
calls the member out of line, and the explicit instantiation of the
class that each dominator tree owner already has emits it.
Negligible size decreases for all of opt/llc/mlir-opt/llvm-bolt
Aided by Claude Opus 5
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