]> granicus.if.org Git - llvm/commitdiff
[EarlyCSE] Cleanup deadcode. [NFCI]
authorAlina Sbirlea <asbirlea@google.com>
Thu, 21 Feb 2019 19:49:57 +0000 (19:49 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Thu, 21 Feb 2019 19:49:57 +0000 (19:49 +0000)
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

lib/Transforms/Scalar/EarlyCSE.cpp

index bc6c60cf314598284e0cdcccfd35634a62c5da8b..c7c407c8677889de36d31a1e0ff44c0855257715 100644 (file)
@@ -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;
 }