Skip to content

Commit

Permalink
8240070: Shenandoah: remove obsolete ShenandoahCommonGCStateLoads
Browse files Browse the repository at this point in the history
Reviewed-by: rkennke
  • Loading branch information
shipilev committed Feb 26, 2020
1 parent 331f492 commit d26dade
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 111 deletions.
40 changes: 0 additions & 40 deletions src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,31 +151,6 @@ bool ShenandoahBarrierC2Support::has_safepoint_between(Node* start, Node* stop,
return false;
}

bool ShenandoahBarrierC2Support::try_common_gc_state_load(Node *n, PhaseIdealLoop *phase) {
assert(is_gc_state_load(n), "inconsistent");
Node* addp = n->in(MemNode::Address);
Node* dominator = NULL;
for (DUIterator_Fast imax, i = addp->fast_outs(imax); i < imax; i++) {
Node* u = addp->fast_out(i);
assert(is_gc_state_load(u), "inconsistent");
if (u != n && phase->is_dominator(u->in(0), n->in(0))) {
if (dominator == NULL) {
dominator = u;
} else {
if (phase->dom_depth(u->in(0)) < phase->dom_depth(dominator->in(0))) {
dominator = u;
}
}
}
}
if (dominator == NULL || has_safepoint_between(n->in(0), dominator->in(0), phase)) {
return false;
}
phase->igvn().replace_node(n, dominator);

return true;
}

#ifdef ASSERT
bool ShenandoahBarrierC2Support::verify_helper(Node* in, Node_Stack& phis, VectorSet& visited, verify_type t, bool trace, Unique_Node_List& barriers_used) {
assert(phis.size() == 0, "");
Expand Down Expand Up @@ -1966,7 +1941,6 @@ IfNode* ShenandoahBarrierC2Support::find_unswitching_candidate(const IdealLoopTr

void ShenandoahBarrierC2Support::optimize_after_expansion(VectorSet &visited, Node_Stack &stack, Node_List &old_new, PhaseIdealLoop* phase) {
Node_List heap_stable_tests;
Node_List gc_state_loads;
stack.push(phase->C->start(), 0);
do {
Node* n = stack.node();
Expand All @@ -1980,26 +1954,12 @@ void ShenandoahBarrierC2Support::optimize_after_expansion(VectorSet &visited, No
}
} else {
stack.pop();
if (ShenandoahCommonGCStateLoads && is_gc_state_load(n)) {
gc_state_loads.push(n);
}
if (n->is_If() && is_heap_stable_test(n)) {
heap_stable_tests.push(n);
}
}
} while (stack.size() > 0);

bool progress;
do {
progress = false;
for (uint i = 0; i < gc_state_loads.size(); i++) {
Node* n = gc_state_loads.at(i);
if (n->outcnt() != 0) {
progress |= try_common_gc_state_load(n, phase);
}
}
} while (progress);

for (uint i = 0; i < heap_stable_tests.size(); i++) {
Node* n = heap_stable_tests.at(i);
assert(is_heap_stable_test(n), "only evacuation test");
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class ShenandoahBarrierC2Support : public AllStatic {
static Node* dom_mem(Node* mem, Node* ctrl, int alias, Node*& mem_ctrl, PhaseIdealLoop* phase);
static Node* no_branches(Node* c, Node* dom, bool allow_one_proj, PhaseIdealLoop* phase);
static bool is_heap_state_test(Node* iff, int mask);
static bool try_common_gc_state_load(Node *n, PhaseIdealLoop *phase);
static bool has_safepoint_between(Node* start, Node* stop, PhaseIdealLoop *phase);
static Node* find_bottom_mem(Node* ctrl, PhaseIdealLoop* phase);
static void follow_barrier_uses(Node* n, Node* ctrl, Unique_Node_List& uses, PhaseIdealLoop* phase);
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,6 @@
"Turn it off for maximum compatibility with reflection or JNI " \
"code that manipulates final fields.") \
\
experimental(bool, ShenandoahCommonGCStateLoads, false, \
"Enable commonming for GC state loads in generated code.") \
\
develop(bool, ShenandoahVerifyOptoBarriers, false, \
"Verify no missing barriers in C2") \
\
Expand Down
67 changes: 0 additions & 67 deletions test/hotspot/jtreg/gc/shenandoah/compiler/TestCommonGCLoads.java

This file was deleted.

0 comments on commit d26dade

Please sign in to comment.