This is an archive of the discontinued LLVM Phabricator instance.

[IDFCalculator] Use DominatorTreeBase instead of DominatorTree
ClosedPublic

Authored by vhscampos on Oct 14 2015, 6:59 AM.

Details

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.

Diff Detail

Event Timeline

vhscampos updated this revision to Diff 37347.Oct 14 2015, 6:59 AM
vhscampos retitled this revision from to [IDFCalculator] Use DominatorTreeBase instead of DominatorTree.
vhscampos updated this object.
vhscampos added a reviewer: dberlin.
vhscampos added a subscriber: llvm-commits.
dberlin edited edge metadata.Oct 14 2015, 7:37 AM
dberlin added a subscriber: dberlin.

LGTM.
Do you need me to commit this for you?

This revision was automatically updated to reflect the committed changes.