[PATCH] D58308: [EarlyCSE] Cleanup deadcode. [NFCI]

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 15 14:50:15 PST 2019


asbirlea created this revision.
asbirlea added reviewers: george.burgess.iv, davide.
Herald added subscribers: jlebar, sanjoy.
Herald added a project: LLVM.

Cleanup nop assignments.


Repository:
  rL LLVM

https://reviews.llvm.org/D58308

Files:
  lib/Transforms/Scalar/EarlyCSE.cpp


Index: lib/Transforms/Scalar/EarlyCSE.cpp
===================================================================
--- lib/Transforms/Scalar/EarlyCSE.cpp
+++ 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;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58308.187094.patch
Type: text/x-patch
Size: 708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190215/2f9bcdfa/attachment.bin>


More information about the llvm-commits mailing list