Skip to content
Permalink
Browse files

8240070: Shenandoah: remove obsolete ShenandoahCommonGCStateLoads

Reviewed-by: rkennke
  • Loading branch information
shipilev committed Feb 26, 2020
1 parent 331f492 commit d26dadef43bc038d1b267473098f4711fe528ea0
@@ -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, "");
@@ -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();
@@ -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");
@@ -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);
@@ -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") \
\

This file was deleted.

0 comments on commit d26dade

Please sign in to comment.