[llvm-commits] [llvm] r53086 - /llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp

Chris Lattner clattner at apple.com
Thu Jul 3 09:41:09 PDT 2008


On Jul 2, 2008, at 11:48 PM, Devang Patel wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=53086&view=rev
> Log:
> Reconstruct dom info, if loop is unswitched.
>
> @@ -113,8 +113,8 @@
>       AU.addRequiredID(LCSSAID);
>       AU.addPreservedID(LCSSAID);
>       // FIXME: Loop Unswitch does not preserve dominator info in  
> all cases.
> +      AU.addPreserved<DominatorTree>();
> +      AU.addPreserved<DominanceFrontier>();

This fixme should go away?

-Chris

>
>     }
>
>   private:
> @@ -206,7 +206,6 @@
>   DT = getAnalysisToUpdate<DominatorTree>();
>   currentLoop = L;
>   bool Changed = false;
> -
>   do {
>     assert(currentLoop->isLCSSAForm());
>     redoLoop = false;
> @@ -459,7 +458,13 @@
>   } else {
>     UnswitchNontrivialCondition(LoopCond, Val, currentLoop);
>   }
> -
> +
> +  // FIXME: Reconstruct dom info, because it is not preserved  
> properly.
> +  Function *F = loopHeader->getParent();
> +  if (DT)
> +    DT->runOnFunction(*F);
> +  if (DF)
> +    DF->runOnFunction(*F);
>   return true;
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list