Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8266542: Remove broken -XX:-UseLoopSafepoints flag #3871

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/parse.hpp
Expand Up @@ -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();
}
}
Expand Down
8 changes: 3 additions & 5 deletions src/hotspot/share/opto/parse2.cpp
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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();
}

Expand Down Expand Up @@ -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:
Expand All @@ -2567,7 +2566,6 @@ void Parse::do_one_bytecode() {
maybe_add_safepoint(iter().next_get_dest());
default:
break;
}
}
b = pop_pair();
a = pop_pair();
Expand Down
12 changes: 6 additions & 6 deletions src/hotspot/share/opto/phaseX.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/runtime/globals.hpp
Expand Up @@ -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")\
Expand Down

This file was deleted.