[IDFCalculator] Use DominatorTreeBase instead of DominatorTree
authorDaniel Berlin <dberlin@dberlin.org>
Wed, 14 Oct 2015 19:54:24 +0000 (19:54 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Wed, 14 Oct 2015 19:54:24 +0000 (19:54 +0000)
commita0241a7b06ae27a7052072683bffd50bed774fba
treefe85a2a64a390764d7186bc57cd194827da7e37f
parente99d2083cf5c8425f01d2e67438155ba98b2ba0e
[IDFCalculator] Use DominatorTreeBase instead of DominatorTree

Summary:
IDFCalculator used a DominatorTree instance for its calculations. Since the PostDominatorTree struct is not a subclass of DominatorTree, it wasn't possible to use PDT in IDFCalculator to compute post-dominance frontiers.

This patch makes IDFCalculator work with a DominatorTreeBase<BasicBlock> instead, which enables PDTs to be utilized.

Patch by Victor Campos (vhscampos@gmail.com)

Reviewers: dberlin

Subscribers: dberlin, llvm-commits

Differential Revision: http://reviews.llvm.org/D13725

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250320 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/IteratedDominanceFrontier.h