Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8268884: C2: Compile::remove_speculative_types must iterate top-down
Reviewed-by: roland, kvn
  • Loading branch information
Nils Eliasson committed Jun 29, 2021
1 parent 25f9f19 commit b8a16e931b1dc77dbe537fc5d2127a94ef71c801
Showing 1 changed file with 12 additions and 8 deletions.
@@ -4581,10 +4581,12 @@ void Compile::remove_speculative_types(PhaseIterGVN &igvn) {
modified++;
}
}
uint max = n->len();
for( uint i = 0; i < max; ++i ) {
Node *m = n->in(i);
if (not_a_node(m)) continue;
// Iterate over outs - endless loops is unreachable from below
for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
Node *m = n->fast_out(i);
if (not_a_node(m)) {
continue;
}
worklist.push(m);
}
}
@@ -4605,10 +4607,12 @@ void Compile::remove_speculative_types(PhaseIterGVN &igvn) {
t = n->as_Type()->type();
assert(t == t->remove_speculative(), "no more speculative types");
}
uint max = n->len();
for( uint i = 0; i < max; ++i ) {
Node *m = n->in(i);
if (not_a_node(m)) continue;
// Iterate over outs - endless loops is unreachable from below
for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
Node *m = n->fast_out(i);
if (not_a_node(m)) {
continue;
}
worklist.push(m);
}
}

1 comment on commit b8a16e9

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on b8a16e9 Jun 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.