changeset 54698:3ebf58dbf5d8

8223137: Rename predicate 'do_unroll_only()' to 'is_unroll_only()'. Reviewed-by: vlivanov
author phedlin
date Wed, 17 Apr 2019 14:52:25 +0200
parents 251090f84412
children 1a5305f51bfd
files src/hotspot/share/opto/loopTransform.cpp src/hotspot/share/opto/loopUnswitch.cpp src/hotspot/share/opto/loopnode.cpp src/hotspot/share/opto/loopnode.hpp src/hotspot/share/opto/superword.cpp
diffstat 5 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/opto/loopTransform.cpp	Fri May 03 15:57:41 2019 +0800
+++ b/src/hotspot/share/opto/loopTransform.cpp	Wed Apr 17 14:52:25 2019 +0200
@@ -352,10 +352,11 @@
   }
 
   // check for vectorized loops, any peeling done was already applied
-  if (_head->is_CountedLoop() && _head->as_CountedLoop()->do_unroll_only()) return false;
-
-  if (_head->is_CountedLoop() && _head->as_CountedLoop()->trip_count() == 1) {
-    return false;
+  if (_head->is_CountedLoop()) {
+    CountedLoopNode* cl = _head->as_CountedLoop();
+    if (cl->is_unroll_only() || cl->trip_count() == 1) {
+      return false;
+    }
   }
 
   while( test != _head ) {      // Scan till run off top of loop
@@ -873,7 +874,7 @@
     return false;
   }
 
-  if (cl->do_unroll_only()) {
+  if (cl->is_unroll_only()) {
     if (TraceSuperWordLoopUnrollAnalysis) {
       tty->print_cr("policy_unroll passed vector loop(vlen=%d,factor = %d)\n", slp_max_unroll_factor, future_unroll_ct);
     }
@@ -935,7 +936,7 @@
   Node *trip_counter = cl->phi();
 
   // check for vectorized loops, some opts are no longer needed
-  if (cl->do_unroll_only()) return false;
+  if (cl->is_unroll_only()) return false;
 
   // Check loop body for tests of trip-counter plus loop-invariant vs
   // loop-invariant.
@@ -989,7 +990,9 @@
 // for unrolling loops with NO array accesses.
 bool IdealLoopTree::policy_peel_only( PhaseIdealLoop *phase ) const {
   // check for vectorized loops, any peeling done was already applied
-  if (_head->is_CountedLoop() && _head->as_CountedLoop()->do_unroll_only()) return false;
+  if (_head->is_CountedLoop() && _head->as_CountedLoop()->is_unroll_only()) {
+    return false;
+  }
 
   for( uint i = 0; i < _body.size(); i++ )
     if( _body[i]->is_Mem() )
--- a/src/hotspot/share/opto/loopUnswitch.cpp	Fri May 03 15:57:41 2019 +0800
+++ b/src/hotspot/share/opto/loopUnswitch.cpp	Wed Apr 17 14:52:25 2019 +0200
@@ -63,7 +63,7 @@
   }
 
   // check for vectorized loops, any unswitching was already applied
-  if (_head->is_CountedLoop() && _head->as_CountedLoop()->do_unroll_only()) {
+  if (_head->is_CountedLoop() && _head->as_CountedLoop()->is_unroll_only()) {
     return false;
   }
 
--- a/src/hotspot/share/opto/loopnode.cpp	Fri May 03 15:57:41 2019 +0800
+++ b/src/hotspot/share/opto/loopnode.cpp	Wed Apr 17 14:52:25 2019 +0200
@@ -2949,7 +2949,7 @@
       if (!is_counted || !lpt->is_inner()) continue;
 
       // check for vectorized loops, any reassociation of invariants was already done
-      if (is_counted && lpt->_head->as_CountedLoop()->do_unroll_only()) continue;
+      if (is_counted && lpt->_head->as_CountedLoop()->is_unroll_only()) continue;
 
       lpt->reassociate_invariants(this);
 
--- a/src/hotspot/share/opto/loopnode.hpp	Fri May 03 15:57:41 2019 +0800
+++ b/src/hotspot/share/opto/loopnode.hpp	Wed Apr 17 14:52:25 2019 +0200
@@ -264,7 +264,7 @@
   bool is_reduction_loop() const { return (_loop_flags&HasReductions) == HasReductions; }
   bool was_slp_analyzed () const { return (_loop_flags&WasSlpAnalyzed) == WasSlpAnalyzed; }
   bool has_passed_slp   () const { return (_loop_flags&PassedSlpAnalysis) == PassedSlpAnalysis; }
-  bool do_unroll_only      () const { return (_loop_flags&DoUnrollOnly) == DoUnrollOnly; }
+  bool is_unroll_only   () const { return (_loop_flags&DoUnrollOnly) == DoUnrollOnly; }
   bool is_main_no_pre_loop() const { return _loop_flags & MainHasNoPreLoop; }
   bool has_atomic_post_loop  () const { return (_loop_flags & HasAtomicPostLoop) == HasAtomicPostLoop; }
   void set_main_no_pre_loop() { _loop_flags |= MainHasNoPreLoop; }
--- a/src/hotspot/share/opto/superword.cpp	Fri May 03 15:57:41 2019 +0800
+++ b/src/hotspot/share/opto/superword.cpp	Wed Apr 17 14:52:25 2019 +0200
@@ -145,7 +145,7 @@
   // Skip any loops already optimized by slp
   if (cl->is_vectorized_loop()) return;
 
-  if (cl->do_unroll_only()) return;
+  if (cl->is_unroll_only()) return;
 
   if (cl->is_main_loop()) {
     // Check for pre-loop ending with CountedLoopEnd(Bool(Cmp(x,Opaque1(limit))))