Skip to content
Permalink
Browse files
8266542: Remove broken -XX:-UseLoopSafepoints flag
Reviewed-by: tschatzl, kvn
  • Loading branch information
TobiHartmann committed May 6, 2021
1 parent 7835cdb commit 22ca62c2cb61940dd7b1028925cd651ffdf80690
@@ -480,7 +480,7 @@ class Parse : public GraphKit {

// Insert a compiler safepoint into the graph, if there is a back-branch.
void maybe_add_safepoint(int target_bci) {
if (UseLoopSafepoints && target_bci <= bci()) {
if (target_bci <= bci()) {
add_safepoint();
}
}
@@ -485,7 +485,7 @@ void Parse::do_tableswitch() {
}

// Safepoint in case if backward branch observed
if (makes_backward_branch && UseLoopSafepoints) {
if (makes_backward_branch) {
add_safepoint();
}

@@ -579,7 +579,7 @@ void Parse::do_lookupswitch() {
}

// Safepoint in case backward branch observed
if (makes_backward_branch && UseLoopSafepoints) {
if (makes_backward_branch) {
add_safepoint();
}

@@ -2555,8 +2555,7 @@ void Parse::do_one_bytecode() {
// a SafePoint here and have it dominate and kill the safepoint added at a
// following backwards branch. At this point the JVM state merely holds 2
// longs but not the 3-way value.
if( UseLoopSafepoints ) {
switch( iter().next_bc() ) {
switch (iter().next_bc()) {
case Bytecodes::_ifgt:
case Bytecodes::_iflt:
case Bytecodes::_ifge:
@@ -2567,7 +2566,6 @@ void Parse::do_one_bytecode() {
maybe_add_safepoint(iter().next_get_dest());
default:
break;
}
}
b = pop_pair();
a = pop_pair();
@@ -407,10 +407,11 @@ void NodeHash::operator=(const NodeHash& nh) {
//------------------------------PhaseRemoveUseless-----------------------------
// 1) Use a breadthfirst walk to collect useful nodes reachable from root.
PhaseRemoveUseless::PhaseRemoveUseless(PhaseGVN* gvn, Unique_Node_List* worklist, PhaseNumber phase_num) : Phase(phase_num) {

// Implementation requires 'UseLoopSafepoints == true' and an edge from root
// to each SafePointNode at a backward branch. Inserted in add_safepoint().
if( !UseLoopSafepoints || !OptoRemoveUseless ) return;
// 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);
@@ -993,8 +994,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(!UseLoopSafepoints || !OptoRemoveUseless,
"remove_useless_nodes missed this node");
assert(!OptoRemoveUseless, "remove_useless_nodes missed this node");
hash_delete(n);
}
}
@@ -1146,9 +1146,6 @@ const intx ObjectAlignmentInBytes = 8;
notproduct(bool, CollectIndexSetStatistics, false, \
"Collect information about IndexSets") \
\
develop(bool, UseLoopSafepoints, true, \
"Generate Safepoint nodes in every loop") \
\
develop(intx, FastAllocateSizeLimit, 128*K, \
/* Note: This value is zero mod 1<<13 for a cheap sparc set. */ \
"Inline allocations larger than this in doublewords must go slow")\

This file was deleted.

1 comment on commit 22ca62c

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 22ca62c May 6, 2021

Please sign in to comment.