# HG changeset patch # User rkennke # Date 1536696540 -7200 # Tue Sep 11 22:09:00 2018 +0200 # Node ID f74f92b8636eca894b25a22e817e2e2cbe7eb2ef # Parent 424866bd51c0d1e99ab867c50ec14e1507bda8e2 Purge some G1-related cruft in C2 diff --git a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp --- a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp +++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp @@ -2669,7 +2669,7 @@ Node* c = old_c; if (c != ctrl || is_dominator_same_ctrl(old_c, barrier, u, phase) || - u->is_g1_marking_load()) { + u->is_shenandoah_state_load()) { phase->igvn().rehash_node_delayed(u); int nb = u->replace_edge(ctrl, region); if (u->is_CFG()) { diff --git a/src/hotspot/share/opto/cfgnode.hpp b/src/hotspot/share/opto/cfgnode.hpp --- a/src/hotspot/share/opto/cfgnode.hpp +++ b/src/hotspot/share/opto/cfgnode.hpp @@ -397,7 +397,6 @@ // Returns NULL is it couldn't improve the type. static const TypeInt* filtered_int_type(PhaseGVN* phase, Node* val, Node* if_proj); - bool is_g1_marking_if(PhaseTransform *phase) const; #if INCLUDE_SHENANDOAHGC bool is_shenandoah_marking_if(PhaseTransform *phase) const; #endif diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp --- a/src/hotspot/share/opto/compile.cpp +++ b/src/hotspot/share/opto/compile.cpp @@ -3904,7 +3904,9 @@ if (cmp->Opcode() == Op_CmpI && cmp->in(2)->is_Con() && cmp->in(2)->bottom_type()->is_int()->get_con() == 0 && cmp->in(1)->is_Load()) { LoadNode* load = cmp->in(1)->as_Load(); - if (load->is_g1_marking_load()) { + if (load->Opcode() == Op_LoadB && load->in(2)->is_AddP() && load->in(2)->in(2)->Opcode() == Op_ThreadLocal + && load->in(2)->in(3)->is_Con() + && load->in(2)->in(3)->bottom_type()->is_intptr_t()->get_con() == marking_offset) { Node* if_ctrl = iff->in(0); Node* load_ctrl = load->in(0); diff --git a/src/hotspot/share/opto/ifnode.cpp b/src/hotspot/share/opto/ifnode.cpp --- a/src/hotspot/share/opto/ifnode.cpp +++ b/src/hotspot/share/opto/ifnode.cpp @@ -1707,22 +1707,6 @@ return iff; } -bool IfNode::is_g1_marking_if(PhaseTransform *phase) const { - if (Opcode() != Op_If) { - return false; - } - - Node* bol = in(1); - assert(bol->is_Bool(), ""); - Node* cmpx = bol->in(1); - if (bol->as_Bool()->_test._test == BoolTest::ne && - cmpx->is_Cmp() && cmpx->in(2) == phase->intcon(0) && - cmpx->in(1)->is_g1_marking_load()) { - return true; - } - return false; -} - #if INCLUDE_SHENANDOAHGC bool IfNode::is_shenandoah_marking_if(PhaseTransform *phase) const { if (!UseShenandoahGC) { diff --git a/src/hotspot/share/opto/node.hpp b/src/hotspot/share/opto/node.hpp --- a/src/hotspot/share/opto/node.hpp +++ b/src/hotspot/share/opto/node.hpp @@ -986,8 +986,6 @@ // Check if 'this' node dominates or equal to 'sub'. bool dominates(Node* sub, Node_List &nlist); - virtual bool is_g1_marking_load() const { return false; } - virtual bool is_g1_marking_if(PhaseTransform *phase) const { return false; } virtual bool is_shenandoah_wb_pre_call() const { return false; } virtual bool is_shenandoah_state_load() const { return false; } virtual bool is_shenandoah_marking_if(PhaseTransform *phase) const { return false; }