< prev index next >
src/hotspot/share/opto/node.cpp
BarrierSetC2_enhancements
* questions.
*
*/
#include "precompiled.hpp"
+ #include "gc/shared/barrierSet.hpp"
+ #include "gc/shared/c2/barrierSetC2.hpp"
#include "libadt/vectset.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "opto/castnode.hpp"
#include "opto/cfgnode.hpp"
***************
#include "opto/node.hpp"
#include "opto/opcodes.hpp"
#include "opto/regmask.hpp"
#include "opto/type.hpp"
#include "utilities/copy.hpp"
+ #include "utilities/macros.hpp"
class RegMask;
// #include "phase.hpp"
class PhaseTransform;
class PhaseGVN;
***************
}
if (is_macro())
C->add_macro_node(n);
if (is_expensive())
C->add_expensive_node(n);
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+ bs->register_potential_barrier_node(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);
}
***************
}
if (is_SafePoint()) {
as_SafePoint()->delete_replaced_nodes();
}
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+ bs->unregister_potential_barrier_node(this);
#ifdef ASSERT
// We will not actually delete the storage, but we'll make the node unusable.
*(address*)this = badAddress; // smash the C++ vtbl, probably
_in = _out = (Node**) badAddress;
_max = _cnt = _outmax = _outcnt = 0;
***************
igvn->C->remove_range_check_cast(cast);
}
if (dead->Opcode() == Op_Opaque4) {
igvn->C->remove_range_check_cast(dead);
}
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+ bs->unregister_potential_barrier_node(dead);
igvn->C->record_dead_node(dead->_idx);
// Kill all inputs to the dead guy
for (uint i=0; i < dead->req(); i++) {
Node *n = dead->in(i); // Get input to dead guy
if (n != NULL && !n->is_top()) { // Input is valid?
***************
// 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 {
+ BarrierSet::barrier_set()->barrier_set_c2()->enqueue_useful_gc_barrier(igvn->_worklist, n);
}
}
}
} // (dead->outcnt() == 0)
} // while (nstack.size() > 0) for outputs
< prev index next >