Skip to content

Commit ed98060

Browse files
committed
8223137: Rename predicate 'do_unroll_only()' to 'is_unroll_only()'.
Backport-of: fcbca82
1 parent b79e707 commit ed98060

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

src/hotspot/share/opto/loopTransform.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,11 @@ bool IdealLoopTree::policy_peeling( PhaseIdealLoop *phase ) const {
352352
}
353353

354354
// check for vectorized loops, any peeling done was already applied
355-
if (_head->is_CountedLoop() && _head->as_CountedLoop()->do_unroll_only()) return false;
356-
357-
if (_head->is_CountedLoop() && _head->as_CountedLoop()->trip_count() == 1) {
358-
return false;
355+
if (_head->is_CountedLoop()) {
356+
CountedLoopNode* cl = _head->as_CountedLoop();
357+
if (cl->is_unroll_only() || cl->trip_count() == 1) {
358+
return false;
359+
}
359360
}
360361

361362
while( test != _head ) { // Scan till run off top of loop
@@ -877,7 +878,7 @@ bool IdealLoopTree::policy_unroll(PhaseIdealLoop *phase) {
877878
return false;
878879
}
879880

880-
if (cl->do_unroll_only()) {
881+
if (cl->is_unroll_only()) {
881882
if (TraceSuperWordLoopUnrollAnalysis) {
882883
tty->print_cr("policy_unroll passed vector loop(vlen=%d,factor = %d)\n", slp_max_unroll_factor, future_unroll_ct);
883884
}
@@ -939,7 +940,7 @@ bool IdealLoopTree::policy_range_check( PhaseIdealLoop *phase ) const {
939940
Node *trip_counter = cl->phi();
940941

941942
// check for vectorized loops, some opts are no longer needed
942-
if (cl->do_unroll_only()) return false;
943+
if (cl->is_unroll_only()) return false;
943944

944945
// Check loop body for tests of trip-counter plus loop-invariant vs
945946
// loop-invariant.
@@ -993,7 +994,9 @@ bool IdealLoopTree::policy_range_check( PhaseIdealLoop *phase ) const {
993994
// for unrolling loops with NO array accesses.
994995
bool IdealLoopTree::policy_peel_only( PhaseIdealLoop *phase ) const {
995996
// check for vectorized loops, any peeling done was already applied
996-
if (_head->is_CountedLoop() && _head->as_CountedLoop()->do_unroll_only()) return false;
997+
if (_head->is_CountedLoop() && _head->as_CountedLoop()->is_unroll_only()) {
998+
return false;
999+
}
9971000

9981001
for( uint i = 0; i < _body.size(); i++ )
9991002
if( _body[i]->is_Mem() )

src/hotspot/share/opto/loopUnswitch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ bool IdealLoopTree::policy_unswitching( PhaseIdealLoop *phase ) const {
6363
}
6464

6565
// check for vectorized loops, any unswitching was already applied
66-
if (_head->is_CountedLoop() && _head->as_CountedLoop()->do_unroll_only()) {
66+
if (_head->is_CountedLoop() && _head->as_CountedLoop()->is_unroll_only()) {
6767
return false;
6868
}
6969

src/hotspot/share/opto/loopnode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3013,7 +3013,7 @@ void PhaseIdealLoop::build_and_optimize(LoopOptsMode mode) {
30133013
if (!is_counted || !lpt->is_inner()) continue;
30143014

30153015
// check for vectorized loops, any reassociation of invariants was already done
3016-
if (is_counted && lpt->_head->as_CountedLoop()->do_unroll_only()) continue;
3016+
if (is_counted && lpt->_head->as_CountedLoop()->is_unroll_only()) continue;
30173017

30183018
lpt->reassociate_invariants(this);
30193019

src/hotspot/share/opto/loopnode.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ class CountedLoopNode : public LoopNode {
264264
bool is_reduction_loop() const { return (_loop_flags&HasReductions) == HasReductions; }
265265
bool was_slp_analyzed () const { return (_loop_flags&WasSlpAnalyzed) == WasSlpAnalyzed; }
266266
bool has_passed_slp () const { return (_loop_flags&PassedSlpAnalysis) == PassedSlpAnalysis; }
267-
bool do_unroll_only () const { return (_loop_flags&DoUnrollOnly) == DoUnrollOnly; }
267+
bool is_unroll_only () const { return (_loop_flags&DoUnrollOnly) == DoUnrollOnly; }
268268
bool is_main_no_pre_loop() const { return _loop_flags & MainHasNoPreLoop; }
269269
bool has_atomic_post_loop () const { return (_loop_flags & HasAtomicPostLoop) == HasAtomicPostLoop; }
270270
void set_main_no_pre_loop() { _loop_flags |= MainHasNoPreLoop; }

src/hotspot/share/opto/superword.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void SuperWord::transform_loop(IdealLoopTree* lpt, bool do_optimization) {
148148
// Skip any loops already optimized by slp
149149
if (cl->is_vectorized_loop()) return;
150150

151-
if (cl->do_unroll_only()) return;
151+
if (cl->is_unroll_only()) return;
152152

153153
if (cl->is_main_loop()) {
154154
// Check for pre-loop ending with CountedLoopEnd(Bool(Cmp(x,Opaque1(limit))))

0 commit comments

Comments
 (0)