Index: llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp =================================================================== --- llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp +++ llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp @@ -1169,8 +1169,7 @@ CurrentGeneration, DT.getRootNode(), DT.getRootNode()->begin(), DT.getRootNode()->end())); - // Save the current generation. - unsigned LiveOutGeneration = CurrentGeneration; + assert(!CurrentGeneration && "Create a new EarlyCSE instance to rerun it."); // Process the stack. while (!nodesToProcess.empty()) { @@ -1202,9 +1201,6 @@ } } // while (!nodes...) - // Reset the current generation. - CurrentGeneration = LiveOutGeneration; - return Changed; }