> Remove ImmediateDominator analysis.  The same information can be  
> obtained from DomTree.  A lot of code for
> constructing ImmediateDominator is now folded into DomTree  
> construction.
>
> This is part of the ongoing work for PR217: http://llvm.org/PR217 .

Woot.
> +
> +     struct InfoRec {

tab

> -    return false;
> -  }
> +     virtual bool runOnFunction(Function &F);

tab

> +  BasicBlock *Eval(BasicBlock *v);
> +  void Link(BasicBlock *V, BasicBlock *W, InfoRec &WInfo);
> +     inline BasicBlock *getIDom(BasicBlock *BB) const {
> +         std::map<BasicBlock*, BasicBlock*>::const_iterator I =  
> IDoms.find(BB);
> +         return I != IDoms.end() ? I->second : 0;
> +       }
>  };

tabz

> -  void calculate(const ImmediatePostDominators &IPD);
> +  void calculate(Function &F);
>    Node *getNodeForBlock(BasicBlock *BB);
> +  unsigned DFSPass(BasicBlock *V, InfoRec &VInfo,unsigned N);
> +     void Compress(BasicBlock *V, InfoRec &VInfo);
> +     BasicBlock *Eval(BasicBlock *V);
> +     void Link(BasicBlock *V, BasicBlock *W, InfoRec &WInfo);
> +

tabs

> +  inline BasicBlock *getIDom(BasicBlock *BB) const {
> +       std::map<BasicBlock*, BasicBlock*>::const_iterator I =  
> IDoms.find(BB);
> +       return I != IDoms.end() ? I->second : 0;
> +     }
>  };

tabz

-Chris
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to