< prev index next >
src/share/vm/opto/phaseX.cpp
Print this page
@@ -33,10 +33,13 @@
#include "opto/machnode.hpp"
#include "opto/opcodes.hpp"
#include "opto/phaseX.hpp"
#include "opto/regalloc.hpp"
#include "opto/rootnode.hpp"
+#if INCLUDE_ALL_GCS
+#include "gc_implementation/shenandoah/c2/shenandoahSupport.hpp"
+#endif
//=============================================================================
#define NODE_HASH_MINIMUM_SIZE 255
//------------------------------NodeHash---------------------------------------
NodeHash::NodeHash(uint est_max_size) :
@@ -1280,11 +1283,13 @@
if (in->outcnt() == 2) {
_worklist.push(in->fast_out(i));
i++;
}
assert(!(i < imax), "sanity");
- }
+ }
+ } else if (in->Opcode() == Op_AddP && CallLeafNode::has_only_g1_wb_pre_uses(in)) {
+ add_users_to_worklist(in);
}
if (ReduceFieldZeroing && dead->is_Load() && i == MemNode::Memory &&
in->is_Proj() && in->in(0) != NULL && in->in(0)->is_Initialize()) {
// A Load that directly follows an InitializeNode is
// going away. The Stores that follow are candidates
@@ -1328,10 +1333,13 @@
C->remove_macro_node(dead);
}
if (dead->is_expensive()) {
C->remove_expensive_node(dead);
}
+ if (dead->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
+ C->remove_shenandoah_barrier(reinterpret_cast<ShenandoahLoadReferenceBarrierNode*>(dead));
+ }
CastIINode* cast = dead->isa_CastII();
if (cast != NULL && cast->has_range_check()) {
C->remove_range_check_cast(cast);
}
}
@@ -1544,10 +1552,17 @@
}
if (use_op == Op_Initialize) {
Node* imem = use->as_Initialize()->proj_out(TypeFunc::Memory);
if (imem != NULL) add_users_to_worklist0(imem);
}
+
+ if (use->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
+ Node* cmp = use->find_out_with(Op_CmpP);
+ if (cmp != NULL) {
+ _worklist.push(cmp);
+ }
+ }
}
}
/**
* Remove the speculative part of all types that we know of
@@ -1671,10 +1686,29 @@
worklist.push(p); // Propagate change to user
}
}
}
}
+ if (m->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
+ for (DUIterator_Fast i2max, i2 = m->fast_outs(i2max); i2 < i2max; i2++) {
+ Node* p = m->fast_out(i2);
+ if (p->Opcode() == Op_CmpP) {
+ if(p->bottom_type() != type(p)) {
+ worklist.push(p);
+ }
+ } else if (p->Opcode() == Op_AddP) {
+ for (DUIterator_Fast i3max, i3 = p->fast_outs(i3max); i3 < i3max; i3++) {
+ Node* q = p->fast_out(i3);
+ if (q->is_Load()) {
+ if(q->bottom_type() != type(q)) {
+ worklist.push(q);
+ }
+ }
+ }
+ }
+ }
+ }
// If n is used in a counted loop exit condition then the type
// of the counted loop's Phi depends on the type of n. See
// PhiNode::Value().
if (m_op == Op_CmpI) {
PhiNode* phi = countedloop_phi_from_cmp((CmpINode*)m, n);
@@ -1772,15 +1806,10 @@
hash_delete(n); // changing bottom type may force a rehash
n->raise_bottom_type(t);
_worklist.push(n); // n re-enters the hash table via the worklist
}
- // Idealize graph using DU info. Must clone() into new-space.
- // DU info is generally used to show profitability, progress or safety
- // (but generally not needed for correctness).
- Node *nn = n->Ideal_DU_postCCP(this);
-
// TEMPORARY fix to ensure that 2nd GVN pass eliminates NULL checks
switch( n->Opcode() ) {
case Op_FastLock: // Revisit FastLocks for lock coarsening
case Op_If:
case Op_CountedLoopEnd:
@@ -1793,16 +1822,10 @@
_worklist.push(n);
break;
default:
break;
}
- if( nn ) {
- _worklist.push(n);
- // Put users of 'n' onto worklist for second igvn transform
- add_users_to_worklist(n);
- return nn;
- }
return n;
}
//---------------------------------saturate------------------------------------
@@ -1951,10 +1974,13 @@
}
break;
default:
break;
}
+ if (old->Opcode() == Op_AddP && CallLeafNode::has_only_g1_wb_pre_uses(old)) {
+ igvn->add_users_to_worklist(old);
+ }
}
}
//-------------------------------replace_by-----------------------------------
< prev index next >