hotspot/src/share/vm/opto/rootnode.cpp
changeset 25913 81dbc151e91c
parent 7397 5b173b4ca846
child 32084 7743e6943cdf
--- a/hotspot/src/share/vm/opto/rootnode.cpp	Fri Jul 18 09:04:01 2014 +0200
+++ b/hotspot/src/share/vm/opto/rootnode.cpp	Fri Jul 25 10:06:17 2014 +0200
@@ -35,10 +35,12 @@
 //------------------------------Ideal------------------------------------------
 // Remove dead inputs
 Node *RootNode::Ideal(PhaseGVN *phase, bool can_reshape) {
+  bool modified = false;
   for( uint i = 1; i < req(); i++ ) { // For all inputs
     // Check for and remove dead inputs
     if( phase->type(in(i)) == Type::TOP ) {
       del_req(i--);             // Delete TOP inputs
+      modified = true;
     }
   }
 
@@ -56,7 +58,7 @@
   // If we want to get the rest of the win later, we should pattern match
   // simple recursive call trees to closed-form solutions.
 
-  return NULL;                  // No further opportunities exposed
+  return modified ? this : NULL;
 }
 
 //=============================================================================