Skip to content
Permalink
Browse files
8240223: Use consistent predicate order in and with PhaseIdealLoop::f…
…ind_predicate

Reviewed-by: thartmann, neliasso, chagedorn
  • Loading branch information
stefank committed Mar 2, 2020
1 parent ac60e4b commit 149134070844ec83bdba5558de8a5399d3e92820
Showing with 9 additions and 9 deletions.
  1. +2 −2 src/hotspot/share/opto/loopUnswitch.cpp
  2. +7 −7 src/hotspot/share/opto/loopnode.cpp
@@ -156,15 +156,15 @@ void PhaseIdealLoop::do_unswitching(IdealLoopTree *loop, Node_List &old_new) {
if (predicate != NULL) {
entry = skip_loop_predicates(entry);
}
if (predicate != NULL && UseLoopPredicate) {
if (predicate != NULL && UseProfiledLoopPredicate) {
// We may have two predicates, find first.
Node* n = find_predicate(entry);
if (n != NULL) {
predicate = n;
entry = skip_loop_predicates(entry);
}
}
if (predicate != NULL && UseProfiledLoopPredicate) {
if (predicate != NULL && UseLoopPredicate) {
entry = find_predicate(entry);
if (entry != NULL) predicate = entry;
}
@@ -2658,22 +2658,22 @@ void PhaseIdealLoop::collect_potentially_useful_predicates(
LoopNode* lpn = loop->_head->as_Loop();
Node* entry = lpn->in(LoopNode::EntryControl);
Node* predicate_proj = find_predicate(entry); // loop_limit_check first
if (predicate_proj != NULL ) { // right pattern that can be used by loop predication
if (predicate_proj != NULL) { // right pattern that can be used by loop predication
assert(entry->in(0)->in(1)->in(1)->Opcode() == Op_Opaque1, "must be");
useful_predicates.push(entry->in(0)->in(1)->in(1)); // good one
entry = skip_loop_predicates(entry);
}
predicate_proj = find_predicate(entry); // Predicate
if (predicate_proj != NULL ) {
useful_predicates.push(entry->in(0)->in(1)->in(1)); // good one
entry = skip_loop_predicates(entry);
}
if (UseProfiledLoopPredicate) {
predicate_proj = find_predicate(entry); // Predicate
if (predicate_proj != NULL ) {
if (predicate_proj != NULL) {
useful_predicates.push(entry->in(0)->in(1)->in(1)); // good one
entry = skip_loop_predicates(entry);
}
}
predicate_proj = find_predicate(entry); // Predicate
if (predicate_proj != NULL) {
useful_predicates.push(entry->in(0)->in(1)->in(1)); // good one
}
}

if (loop->_next) { // sibling

0 comments on commit 1491340

Please sign in to comment.