Add a DominatorTree argument to isLCSSA so that it doesn't have to
compute a set of reachable blocks for itself each time it is called, which
is fairly frequently.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98179 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index cb563c3..838a3e7 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -215,7 +215,7 @@
 void IndVarSimplify::RewriteLoopExitValues(Loop *L,
                                            SCEVExpander &Rewriter) {
   // Verify the input to the pass in already in LCSSA form.
-  assert(L->isLCSSAForm());
+  assert(L->isLCSSAForm(*DT));
 
   SmallVector<BasicBlock*, 8> ExitBlocks;
   L->getUniqueExitBlocks(ExitBlocks);
@@ -445,7 +445,7 @@
   // Clean up dead instructions.
   Changed |= DeleteDeadPHIs(L->getHeader());
   // Check a post-condition.
-  assert(L->isLCSSAForm() && "Indvars did not leave the loop in lcssa form!");
+  assert(L->isLCSSAForm(*DT) && "Indvars did not leave the loop in lcssa form!");
   return Changed;
 }