8217782: Spill detection broken after JDK-8217716
authorredestad
Fri, 25 Jan 2019 14:10:28 +0100
changeset 53487 a692b606b4cd
parent 53486 ca088a319147
child 53488 fffa4d0c0c14
8217782: Spill detection broken after JDK-8217716 Reviewed-by: shade, thartmann
src/hotspot/share/opto/chaitin.cpp
--- a/src/hotspot/share/opto/chaitin.cpp	Fri Jan 25 11:45:26 2019 +0000
+++ b/src/hotspot/share/opto/chaitin.cpp	Fri Jan 25 14:10:28 2019 +0100
@@ -756,6 +756,16 @@
           lrg._is_float = 1;
         }
 
+        // Check for twice prior spilling.  Once prior spilling might have
+        // spilled 'soft', 2nd prior spill should have spilled 'hard' and
+        // further spilling is unlikely to make progress.
+        if (_spilled_once.test(n->_idx)) {
+          lrg._was_spilled1 = 1;
+          if (_spilled_twice.test(n->_idx)) {
+            lrg._was_spilled2 = 1;
+          }
+        }
+
 #ifndef PRODUCT
         // Collect bits not used by product code, but which may be useful for
         // debugging.
@@ -768,16 +778,6 @@
           copy_src._has_copy = 1;
         }
 
-        // Check for twice prior spilling.  Once prior spilling might have
-        // spilled 'soft', 2nd prior spill should have spilled 'hard' and
-        // further spilling is unlikely to make progress.
-        if (_spilled_once.test(n->_idx)) {
-          lrg._was_spilled1 = 1;
-          if (_spilled_twice.test(n->_idx)) {
-            lrg._was_spilled2 = 1;
-          }
-        }
-
         if (trace_spilling() && lrg._def != NULL) {
           // collect defs for MultiDef printing
           if (lrg._defs == NULL) {