[llvm-commits] CVS: llvm/lib/Transforms/Utils/LoopSimplify.cpp

Chris Lattner clattner at apple.com
Mon Apr 9 15:42:14 PDT 2007


>  /// FindPHIToPartitionLoops - The first part of loop-nestification  
> is to find a
>  /// PHI node that tells us how to partition the loops.
>  static PHINode *FindPHIToPartitionLoops(Loop *L, ETForest *EF,
> -					AliasAnalysis *AA) {
> +          AliasAnalysis *AA) {

This is still indented funkily :)

> @@ -676,11 +676,11 @@
>  // Returns true if BasicBlock A dominates at least one block in  
> vector B
>  // Helper function for UpdateDomInfoForRevectoredPreds
>  static bool BlockDominatesAny(BasicBlock* A,  
> std::vector<BasicBlock*>& B, ETForest& ETF) {

The vector and ETF should be const.

> @@ -852,36 +852,36 @@
>      // their dominance frontier must be updated to contain NewBB  
> instead.
>      //
>      for (Function::iterator FI = NewBB->getParent()->begin(),
> +         FE = NewBB->getParent()->end(); FI != FE; ++FI) {
> +      DominanceFrontier::iterator DFI = DF->find(FI);
> +      if (DFI == DF->end()) continue;  // unreachable block.
> +
> +      // Only consider dominators of NewBBSucc
> +      if (!DFI->second.count(NewBBSucc)) continue;
> +      if (BlockDominatesAny(FI, PredBlocks, ETF)) {

Please add a blank line between these two.  :)

Thanks Owen! nice work,

-Chris






More information about the llvm-commits mailing list