[llvm-commits] [llvm] r43259 - in /llvm/trunk: include/llvm/Analysis/PostDominators.h lib/Analysis/PostDominators.cpp lib/VMCore/Dominators.cpp
Chris Lattner
clattner at apple.com
Tue Oct 23 16:50:32 PDT 2007
On Oct 23, 2007, at 1:58 PM, Owen Anderson wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=43259&view=rev
> Log:
> Make DomTree and PostDomTree thin wrappers around DomTreeBase,
> rather than inheriting from it.
Very nice!
> @@ -21,17 +21,39 @@
> /// PostDominatorTree Class - Concrete subclass of DominatorTree
> that is used to
> /// compute the a post-dominator tree.
> ///
> -struct PostDominatorTree : public DominatorTreeBase<BasicBlock> {
> +struct PostDominatorTree : public FunctionPass {
> static char ID; // Pass identification, replacement for typeid
> + DominatorTreeBase<BasicBlock>* DT;
Is there any reason to new/delete the DT pointer? Why not just have
DomTreeBase be embedded by-value?
-Chris
More information about the llvm-commits
mailing list