[PATCH] D35315: [Dominators] Make IsPostDominator a template parameter
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 10:59:52 PDT 2017
kuhar created this revision.
Herald added a subscriber: mzolotukhin.
DominatorTreeBase used to have IsPostDominators (bool) member to indicate if the tree is a dominator or a postdominator tree. This made it possible to switch between the two 'modes' at runtime, but it isn't used in practice anywhere.
This patch makes IsPostDominator a template argument. This way, it is easier to switch between different algorithms at compile-time based on this argument and design external utilities around it. It also makes it impossible to incidentally assign a postdominator tree to a dominator tree (and vice versa), and to further simplify template code in GenericDominatorTreeConstruction.
https://reviews.llvm.org/D35315
Files:
include/llvm/Analysis/DominanceFrontier.h
include/llvm/Analysis/DominanceFrontierImpl.h
include/llvm/Analysis/IteratedDominanceFrontier.h
include/llvm/Analysis/LoopInfo.h
include/llvm/Analysis/LoopInfoImpl.h
include/llvm/Analysis/PostDominators.h
include/llvm/CodeGen/MachineDominanceFrontier.h
include/llvm/CodeGen/MachineDominators.h
include/llvm/CodeGen/MachinePostDominators.h
include/llvm/IR/Dominators.h
include/llvm/Support/GenericDomTree.h
lib/Analysis/DominanceFrontier.cpp
lib/Analysis/IteratedDominanceFrontier.cpp
lib/Analysis/LoopInfo.cpp
lib/Analysis/PostDominators.cpp
lib/CodeGen/MachineDominanceFrontier.cpp
lib/CodeGen/MachineDominators.cpp
lib/CodeGen/MachinePostDominators.cpp
lib/IR/Dominators.cpp
lib/Transforms/IPO/SampleProfile.cpp
unittests/IR/DominatorTreeTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35315.106255.patch
Type: text/x-patch
Size: 33035 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170712/218c7ed9/attachment.bin>
More information about the llvm-commits
mailing list