< prev index next >
src/share/vm/opto/node.cpp
Print this page
*** 33,42 ****
--- 33,45 ----
#include "opto/node.hpp"
#include "opto/opcodes.hpp"
#include "opto/regmask.hpp"
#include "opto/type.hpp"
#include "utilities/copy.hpp"
+ #if INCLUDE_ALL_GCS
+ #include "gc_implementation/shenandoah/c2/shenandoahSupport.hpp"
+ #endif
class RegMask;
// #include "phase.hpp"
class PhaseTransform;
class PhaseGVN;
*** 527,536 ****
--- 530,543 ----
}
if (is_macro())
C->add_macro_node(n);
if (is_expensive())
C->add_expensive_node(n);
+
+ if (Opcode() == Op_ShenandoahLoadReferenceBarrier) {
+ C->add_shenandoah_barrier(reinterpret_cast<ShenandoahLoadReferenceBarrierNode*>(n));
+ }
// If the cloned node is a range check dependent CastII, add it to the list.
CastIINode* cast = n->isa_CastII();
if (cast != NULL && cast->has_range_check()) {
C->add_range_check_cast(cast);
}
*** 660,669 ****
--- 667,679 ----
compile->remove_macro_node(this);
}
if (is_expensive()) {
compile->remove_expensive_node(this);
}
+ if (Opcode() == Op_ShenandoahLoadReferenceBarrier) {
+ compile->remove_shenandoah_barrier(reinterpret_cast<ShenandoahLoadReferenceBarrierNode*>(this));
+ }
CastIINode* cast = isa_CastII();
if (cast != NULL && cast->has_range_check()) {
compile->remove_range_check_cast(cast);
}
*** 975,984 ****
--- 985,999 ----
}
}
return (Node*) p;
}
+ // Return true if the current node has an out that matches opcode.
+ bool Node::has_out_with(int opcode) {
+ return (find_out_with(opcode) != NULL);
+ }
+
//------------------------------add_prec---------------------------------------
// Add a new precedence input. Precedence inputs are unordered, with
// duplicates removed and NULLs packed down at the end.
void Node::add_prec( Node *n ) {
assert( is_not_dead(n), "can not use dead node");
*** 1381,1390 ****
--- 1396,1408 ----
igvn->C->remove_macro_node(dead);
}
if (dead->is_expensive()) {
igvn->C->remove_expensive_node(dead);
}
+ if (dead->Opcode() == Op_ShenandoahLoadReferenceBarrier) {
+ igvn->C->remove_shenandoah_barrier(reinterpret_cast<ShenandoahLoadReferenceBarrierNode*>(dead));
+ }
CastIINode* cast = dead->isa_CastII();
if (cast != NULL && cast->has_range_check()) {
igvn->C->remove_range_check_cast(cast);
}
igvn->C->record_dead_node(dead->_idx);
*** 1403,1412 ****
--- 1421,1432 ----
// Push store's uses on worklist to enable folding optimization for
// store/store and store/load to the same address.
// The restriction (outcnt() <= 2) is the same as in set_req_X()
// and remove_globally_dead_node().
igvn->add_users_to_worklist( n );
+ } else if (n->Opcode() == Op_AddP && CallLeafNode::has_only_g1_wb_pre_uses(n)) {
+ igvn->add_users_to_worklist(n);
}
}
}
} // (dead->outcnt() == 0)
} // while (nstack.size() > 0) for outputs
*** 1430,1445 ****
return true;
}
return false;
}
- //------------------------------Ideal_DU_postCCP-------------------------------
- // Idealize graph, using DU info. Must clone result into new-space
- Node *Node::Ideal_DU_postCCP( PhaseCCP * ) {
- return NULL; // Default to no change
- }
-
//------------------------------hash-------------------------------------------
// Hash function over Nodes.
uint Node::hash() const {
uint sum = 0;
for( uint i=0; i<_cnt; i++ ) // Add in all inputs
--- 1450,1459 ----
*** 2124,2133 ****
--- 2138,2155 ----
}
}
return found;
}
+ void Node::ensure_control_or_add_prec(Node* c) {
+ if (in(0) == NULL) {
+ set_req(0, c);
+ } else if (in(0) != c) {
+ add_prec(c);
+ }
+ }
+
//=============================================================================
//------------------------------yank-------------------------------------------
// Find and remove
void Node_List::yank( Node *n ) {
uint i;
< prev index next >