8266618: Remove broken -XX:-OptoRemoveUseless

Reviewed-by: kvn, neliasso
This commit is contained in:
Tobias Hartmann 2021-05-07 09:55:08 +00:00
parent 94c6177f24
commit a65021e38c
3 changed files with 2 additions and 8 deletions

View File

@ -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") \
\

View File

@ -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);
}

View File

@ -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);
}
}