From: Alina Sbirlea Date: Thu, 21 Feb 2019 19:49:57 +0000 (+0000) Subject: [EarlyCSE] Cleanup deadcode. [NFCI] X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=924e7815a549d38f8a79e5b48974729e0dfddf0b;p=llvm [EarlyCSE] Cleanup deadcode. [NFCI] Summary: Cleanup nop assignments. Reviewers: george.burgess.iv, davide Subscribers: sanjoy, jlebar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58308 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354612 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/EarlyCSE.cpp b/lib/Transforms/Scalar/EarlyCSE.cpp index bc6c60cf314..c7c407c8677 100644 --- a/lib/Transforms/Scalar/EarlyCSE.cpp +++ b/lib/Transforms/Scalar/EarlyCSE.cpp @@ -1169,8 +1169,7 @@ bool EarlyCSE::run() { 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 @@ bool EarlyCSE::run() { } } // while (!nodes...) - // Reset the current generation. - CurrentGeneration = LiveOutGeneration; - return Changed; }