Skip to content
Permalink
Browse files
8266618: Remove broken -XX:-OptoRemoveUseless
Reviewed-by: kvn, neliasso
  • Loading branch information
TobiHartmann committed May 7, 2021
1 parent 94c6177 commit a65021e38c8f2be67be08475da67956a5a47e408
@@ -158,9 +158,6 @@
develop_pd(bool, OptoPeephole, \
"Apply peephole optimizations after register allocation") \
\
develop(bool, OptoRemoveUseless, true, \
"Remove useless nodes after parsing") \
\
notproduct(bool, PrintFrameConverterAssembly, false, \
"Print New compiler assembly output for frame converters") \
\
@@ -2290,7 +2290,7 @@ void Parse::add_safepoint() {

// Provide an edge from root to safepoint. This makes the safepoint
// appear useful until the parse has completed.
if( OptoRemoveUseless && transformed_sfpnt->is_SafePoint() ) {
if (transformed_sfpnt->is_SafePoint()) {
assert(C->root() != NULL, "Expect parse is still valid");
C->root()->add_prec(transformed_sfpnt);
}
@@ -409,9 +409,6 @@ void NodeHash::operator=(const NodeHash& nh) {
PhaseRemoveUseless::PhaseRemoveUseless(PhaseGVN* gvn, Unique_Node_List* worklist, PhaseNumber phase_num) : Phase(phase_num) {
// Implementation requires an edge from root to each SafePointNode
// at a backward branch. Inserted in add_safepoint().
if (!OptoRemoveUseless) {
return;
}

// Identify nodes that are reachable from below, useful.
C->identify_useful_nodes(_useful);
@@ -994,7 +991,7 @@ PhaseIterGVN::PhaseIterGVN(PhaseGVN* gvn) : PhaseGVN(gvn),
if(n != NULL && n != _table.sentinel() && n->outcnt() == 0) {
if( n->is_top() ) continue;
// If remove_useless_nodes() has run, we expect no such nodes left.
assert(!OptoRemoveUseless, "remove_useless_nodes missed this node");
assert(false, "remove_useless_nodes missed this node");
hash_delete(n);
}
}

1 comment on commit a65021e

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on a65021e May 7, 2021

Please sign in to comment.