8235653: Clean-up BarrierSetC2
Reviewed-by: redestad, rkennke, thartmann
This commit is contained in:
parent
ec0fbdc0e9
commit
e1b94b1635
@ -157,11 +157,6 @@ public:
|
||||
|
||||
GraphKit* kit() const { return _kit; }
|
||||
|
||||
template <typename T>
|
||||
T barrier_set_state_as() const {
|
||||
return reinterpret_cast<T>(barrier_set_state());
|
||||
}
|
||||
|
||||
virtual PhaseGVN& gvn() const;
|
||||
virtual bool is_parse_access() const { return true; }
|
||||
};
|
||||
@ -187,8 +182,6 @@ public:
|
||||
Node* memory() const { return _memory; }
|
||||
uint alias_idx() const { return _alias_idx; }
|
||||
bool needs_pinning() const { return _needs_pinning; }
|
||||
|
||||
void set_needs_pinning(bool value) { _needs_pinning = value; }
|
||||
};
|
||||
|
||||
// C2Access for optimization time calls to the BarrierSetC2 backend.
|
||||
@ -205,11 +198,8 @@ public:
|
||||
fixup_decorators();
|
||||
}
|
||||
|
||||
|
||||
MergeMemNode* mem() const { return _mem; }
|
||||
Node* ctl() const { return _ctl; }
|
||||
// void set_mem(Node* mem) { _mem = mem; }
|
||||
void set_ctl(Node* ctl) { _ctl = ctl; }
|
||||
|
||||
virtual PhaseGVN& gvn() const { return _gvn; }
|
||||
virtual bool is_opt_access() const { return true; }
|
||||
@ -248,15 +238,12 @@ public:
|
||||
|
||||
virtual void clone(GraphKit* kit, Node* src, Node* dst, Node* size, bool is_array) const;
|
||||
|
||||
virtual Node* resolve(GraphKit* kit, Node* n, DecoratorSet decorators) const { return n; }
|
||||
|
||||
virtual Node* obj_allocate(PhaseMacroExpand* macro, Node* ctrl, Node* mem, Node* toobig_false, Node* size_in_bytes,
|
||||
Node*& i_o, Node*& needgc_ctrl,
|
||||
Node*& fast_oop_ctrl, Node*& fast_oop_rawmem,
|
||||
intx prefetch_lines) const;
|
||||
|
||||
virtual Node* ideal_node(PhaseGVN* phase, Node* n, bool can_reshape) const { return NULL; }
|
||||
virtual Node* identity_node(PhaseGVN* phase, Node* n) const { return n; }
|
||||
|
||||
// These are general helper methods used by C2
|
||||
enum ArrayCopyPhase {
|
||||
@ -272,7 +259,6 @@ public:
|
||||
virtual bool has_load_barrier_nodes() const { return false; }
|
||||
virtual bool is_gc_barrier_node(Node* node) const { return false; }
|
||||
virtual Node* step_over_gc_barrier(Node* c) const { return c; }
|
||||
virtual Node* step_over_gc_barrier_ctrl(Node* c) const { return c; }
|
||||
|
||||
// Support for macro expanded GC barriers
|
||||
virtual void register_potential_barrier_node(Node* node) const { }
|
||||
@ -291,17 +277,13 @@ public:
|
||||
virtual bool strip_mined_loops_expanded(LoopOptsMode mode) const { return false; }
|
||||
virtual bool is_gc_specific_loop_opts_pass(LoopOptsMode mode) const { return false; }
|
||||
|
||||
virtual bool has_special_unique_user(const Node* node) const { return false; }
|
||||
|
||||
enum CompilePhase {
|
||||
BeforeOptimize,
|
||||
BeforeMacroExpand,
|
||||
BeforeCodeGen
|
||||
};
|
||||
|
||||
virtual bool flatten_gc_alias_type(const TypePtr*& adr_type) const { return false; }
|
||||
#ifdef ASSERT
|
||||
virtual bool verify_gc_alias_type(const TypePtr* adr_type, int offset) const { return false; }
|
||||
virtual void verify_gc_barriers(Compile* compile, CompilePhase phase) const {}
|
||||
#endif
|
||||
|
||||
@ -311,17 +293,9 @@ public:
|
||||
virtual bool escape_add_final_edges(ConnectionGraph* conn_graph, PhaseGVN* gvn, Node* n, uint opcode) const { return false; }
|
||||
virtual bool escape_has_out_with_unsafe_object(Node* n) const { return false; }
|
||||
|
||||
virtual bool matcher_find_shared_visit(Matcher* matcher, Matcher::MStack& mstack, Node* n, uint opcode, bool& mem_op, int& mem_addr_idx) const { return false; };
|
||||
virtual bool matcher_find_shared_post_visit(Matcher* matcher, Node* n, uint opcode) const { return false; };
|
||||
virtual bool matcher_is_store_load_barrier(Node* x, uint xop) const { return false; }
|
||||
|
||||
virtual void igvn_add_users_to_worklist(PhaseIterGVN* igvn, Node* use) const { }
|
||||
virtual void ccp_analyze(PhaseCCP* ccp, Unique_Node_List& worklist, Node* use) const { }
|
||||
|
||||
virtual Node* split_if_pre(PhaseIdealLoop* phase, Node* n) const { return NULL; }
|
||||
virtual bool build_loop_late_post(PhaseIdealLoop* phase, Node* n) const { return false; }
|
||||
virtual bool sink_node(PhaseIdealLoop* phase, Node* n, Node* x, Node* x_ctrl, Node* n_ctrl) const { return false; }
|
||||
|
||||
virtual void late_barrier_analysis() const { }
|
||||
virtual int estimate_stub_size() const { return 0; }
|
||||
virtual void emit_stubs(CodeBuffer& cb) const { }
|
||||
|
@ -1475,8 +1475,6 @@ const TypePtr *Compile::flatten_alias_type( const TypePtr *tj ) const {
|
||||
tj = TypeInstPtr::MARK;
|
||||
ta = TypeAryPtr::RANGE; // generic ignored junk
|
||||
ptr = TypePtr::BotPTR;
|
||||
} else if (BarrierSet::barrier_set()->barrier_set_c2()->flatten_gc_alias_type(tj)) {
|
||||
ta = tj->isa_aryptr();
|
||||
} else { // Random constant offset into array body
|
||||
offset = Type::OffsetBot; // Flatten constant access into array body
|
||||
tj = ta = TypeAryPtr::make(ptr,ta->ary(),ta->klass(),false,offset);
|
||||
@ -1541,8 +1539,6 @@ const TypePtr *Compile::flatten_alias_type( const TypePtr *tj ) const {
|
||||
if (!is_known_inst) { // Do it only for non-instance types
|
||||
tj = to = TypeInstPtr::make(TypePtr::BotPTR, env()->Object_klass(), false, NULL, offset);
|
||||
}
|
||||
} else if (BarrierSet::barrier_set()->barrier_set_c2()->flatten_gc_alias_type(tj)) {
|
||||
to = tj->is_instptr();
|
||||
} else if (offset < 0 || offset >= k->size_helper() * wordSize) {
|
||||
// Static fields are in the space above the normal instance
|
||||
// fields in the java.lang.Class instance.
|
||||
@ -1641,8 +1637,7 @@ const TypePtr *Compile::flatten_alias_type( const TypePtr *tj ) const {
|
||||
(offset == Type::OffsetBot && tj == TypePtr::BOTTOM) ||
|
||||
(offset == oopDesc::mark_offset_in_bytes() && tj->base() == Type::AryPtr) ||
|
||||
(offset == oopDesc::klass_offset_in_bytes() && tj->base() == Type::AryPtr) ||
|
||||
(offset == arrayOopDesc::length_offset_in_bytes() && tj->base() == Type::AryPtr) ||
|
||||
(BarrierSet::barrier_set()->barrier_set_c2()->verify_gc_alias_type(tj, offset)),
|
||||
(offset == arrayOopDesc::length_offset_in_bytes() && tj->base() == Type::AryPtr),
|
||||
"For oops, klasses, raw offset must be constant; for arrays the offset is never known" );
|
||||
assert( tj->ptr() != TypePtr::TopPTR &&
|
||||
tj->ptr() != TypePtr::AnyNull &&
|
||||
|
@ -1696,14 +1696,6 @@ void GraphKit::access_clone(Node* src, Node* dst, Node* size, bool is_array) {
|
||||
return _barrier_set->clone(this, src, dst, size, is_array);
|
||||
}
|
||||
|
||||
Node* GraphKit::access_resolve(Node* n, DecoratorSet decorators) {
|
||||
// Use stronger ACCESS_WRITE|ACCESS_READ by default.
|
||||
if ((decorators & (ACCESS_READ | ACCESS_WRITE)) == 0) {
|
||||
decorators |= ACCESS_READ | ACCESS_WRITE;
|
||||
}
|
||||
return _barrier_set->resolve(this, n, decorators);
|
||||
}
|
||||
|
||||
//-------------------------array_element_address-------------------------
|
||||
Node* GraphKit::array_element_address(Node* ary, Node* idx, BasicType elembt,
|
||||
const TypeInt* sizetype, Node* ctrl) {
|
||||
@ -3324,8 +3316,6 @@ FastLockNode* GraphKit::shared_lock(Node* obj) {
|
||||
|
||||
assert(dead_locals_are_killed(), "should kill locals before sync. point");
|
||||
|
||||
obj = access_resolve(obj, ACCESS_READ | ACCESS_WRITE);
|
||||
|
||||
// Box the stack location
|
||||
Node* box = _gvn.transform(new BoxLockNode(next_monitor()));
|
||||
Node* mem = reset_memory();
|
||||
@ -4050,8 +4040,6 @@ void GraphKit::inflate_string_slow(Node* src, Node* dst, Node* start, Node* coun
|
||||
* dst[i_char++] = (char)(src[i_byte] & 0xff);
|
||||
* }
|
||||
*/
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
dst = access_resolve(dst, ACCESS_WRITE);
|
||||
add_predicate();
|
||||
RegionNode* head = new RegionNode(3);
|
||||
head->init_req(1, control());
|
||||
|
@ -639,8 +639,6 @@ class GraphKit : public Phase {
|
||||
|
||||
void access_clone(Node* src, Node* dst, Node* size, bool is_array);
|
||||
|
||||
Node* access_resolve(Node* n, DecoratorSet decorators);
|
||||
|
||||
// Return addressing for an array element.
|
||||
Node* array_element_address(Node* ary, Node* idx, BasicType elembt,
|
||||
// Optional constraint on the array size:
|
||||
|
@ -1135,9 +1135,6 @@ bool LibraryCallKit::inline_string_compareTo(StrIntrinsicNode::ArgEnc ae) {
|
||||
arg1 = must_be_not_null(arg1, true);
|
||||
arg2 = must_be_not_null(arg2, true);
|
||||
|
||||
arg1 = access_resolve(arg1, ACCESS_READ);
|
||||
arg2 = access_resolve(arg2, ACCESS_READ);
|
||||
|
||||
// Get start addr and length of first argument
|
||||
Node* arg1_start = array_element_address(arg1, intcon(0), T_BYTE);
|
||||
Node* arg1_cnt = load_array_length(arg1);
|
||||
@ -1165,9 +1162,6 @@ bool LibraryCallKit::inline_string_equals(StrIntrinsicNode::ArgEnc ae) {
|
||||
arg1 = must_be_not_null(arg1, true);
|
||||
arg2 = must_be_not_null(arg2, true);
|
||||
|
||||
arg1 = access_resolve(arg1, ACCESS_READ);
|
||||
arg2 = access_resolve(arg2, ACCESS_READ);
|
||||
|
||||
// Get start addr and length of first argument
|
||||
Node* arg1_start = array_element_address(arg1, intcon(0), T_BYTE);
|
||||
Node* arg1_cnt = load_array_length(arg1);
|
||||
@ -1208,9 +1202,6 @@ bool LibraryCallKit::inline_array_equals(StrIntrinsicNode::ArgEnc ae) {
|
||||
Node* arg1 = argument(0);
|
||||
Node* arg2 = argument(1);
|
||||
|
||||
arg1 = access_resolve(arg1, ACCESS_READ);
|
||||
arg2 = access_resolve(arg2, ACCESS_READ);
|
||||
|
||||
const TypeAryPtr* mtype = (ae == StrIntrinsicNode::UU) ? TypeAryPtr::CHARS : TypeAryPtr::BYTES;
|
||||
set_result(_gvn.transform(new AryEqNode(control(), memory(mtype), arg1, arg2, ae)));
|
||||
clear_upper_avx();
|
||||
@ -1237,7 +1228,6 @@ bool LibraryCallKit::inline_hasNegatives() {
|
||||
if (stopped()) {
|
||||
return true;
|
||||
}
|
||||
ba = access_resolve(ba, ACCESS_READ);
|
||||
Node* ba_start = array_element_address(ba, offset, T_BYTE);
|
||||
Node* result = new HasNegativesNode(control(), memory(TypeAryPtr::BYTES), ba_start, len);
|
||||
set_result(_gvn.transform(result));
|
||||
@ -1308,9 +1298,6 @@ bool LibraryCallKit::inline_string_indexOf(StrIntrinsicNode::ArgEnc ae) {
|
||||
src = must_be_not_null(src, true);
|
||||
tgt = must_be_not_null(tgt, true);
|
||||
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
tgt = access_resolve(tgt, ACCESS_READ);
|
||||
|
||||
// Get start addr and length of source string
|
||||
Node* src_start = array_element_address(src, intcon(0), T_BYTE);
|
||||
Node* src_count = load_array_length(src);
|
||||
@ -1358,9 +1345,6 @@ bool LibraryCallKit::inline_string_indexOfI(StrIntrinsicNode::ArgEnc ae) {
|
||||
src = must_be_not_null(src, true);
|
||||
tgt = must_be_not_null(tgt, true);
|
||||
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
tgt = access_resolve(tgt, ACCESS_READ);
|
||||
|
||||
// Multiply byte array index by 2 if String is UTF16 encoded
|
||||
Node* src_offset = (ae == StrIntrinsicNode::LL) ? from_index : _gvn.transform(new LShiftINode(from_index, intcon(1)));
|
||||
src_count = _gvn.transform(new SubINode(src_count, from_index));
|
||||
@ -1447,7 +1431,6 @@ bool LibraryCallKit::inline_string_indexOfChar() {
|
||||
Node* max = argument(3);
|
||||
|
||||
src = must_be_not_null(src, true);
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
|
||||
Node* src_offset = _gvn.transform(new LShiftINode(from_index, intcon(1)));
|
||||
Node* src_start = array_element_address(src, src_offset, T_BYTE);
|
||||
@ -1538,9 +1521,6 @@ bool LibraryCallKit::inline_string_copy(bool compress) {
|
||||
return true;
|
||||
}
|
||||
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
dst = access_resolve(dst, ACCESS_WRITE);
|
||||
|
||||
Node* src_start = array_element_address(src, src_offset, src_elem);
|
||||
Node* dst_start = array_element_address(dst, dst_offset, dst_elem);
|
||||
// 'src_start' points to src array + scaled offset
|
||||
@ -1631,7 +1611,6 @@ bool LibraryCallKit::inline_string_toBytesU() {
|
||||
AllocateArrayNode* alloc = tightly_coupled_allocation(newcopy, NULL);
|
||||
|
||||
// Calculate starting addresses.
|
||||
value = access_resolve(value, ACCESS_READ);
|
||||
Node* src_start = array_element_address(value, offset, T_CHAR);
|
||||
Node* dst_start = basic_plus_adr(newcopy, arrayOopDesc::base_offset_in_bytes(T_BYTE));
|
||||
|
||||
@ -1715,9 +1694,6 @@ bool LibraryCallKit::inline_string_getCharsU() {
|
||||
}
|
||||
|
||||
if (!stopped()) {
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
dst = access_resolve(dst, ACCESS_WRITE);
|
||||
|
||||
// Calculate starting addresses.
|
||||
Node* src_start = array_element_address(src, src_begin, T_BYTE);
|
||||
Node* dst_start = array_element_address(dst, dst_begin, T_CHAR);
|
||||
@ -1786,7 +1762,6 @@ bool LibraryCallKit::inline_string_char_access(bool is_store) {
|
||||
}
|
||||
|
||||
value = must_be_not_null(value, true);
|
||||
value = access_resolve(value, is_store ? ACCESS_WRITE : ACCESS_READ);
|
||||
|
||||
Node* adr = array_element_address(value, index, T_CHAR);
|
||||
if (adr->is_top()) {
|
||||
@ -2278,7 +2253,6 @@ inline Node* LibraryCallKit::make_unsafe_address(Node*& base, Node* offset, Deco
|
||||
}
|
||||
// We don't know if it's an on heap or off heap access. Fall back
|
||||
// to raw memory access.
|
||||
base = access_resolve(base, decorators);
|
||||
Node* raw = _gvn.transform(new CheckCastPPNode(control(), base, TypeRawPtr::BOTTOM));
|
||||
return basic_plus_adr(top(), raw, offset);
|
||||
} else {
|
||||
@ -3397,10 +3371,6 @@ bool LibraryCallKit::inline_native_subtype_check() {
|
||||
klasses[which_arg] = _gvn.transform(kls);
|
||||
}
|
||||
|
||||
// Resolve oops to stable for CmpP below.
|
||||
args[0] = access_resolve(args[0], 0);
|
||||
args[1] = access_resolve(args[1], 0);
|
||||
|
||||
// Having loaded both klasses, test each for null.
|
||||
bool never_see_null = !too_many_traps(Deoptimization::Reason_null_check);
|
||||
for (which_arg = 0; which_arg <= 1; which_arg++) {
|
||||
@ -3686,8 +3656,6 @@ bool LibraryCallKit::inline_array_copyOf(bool is_copyOfRange) {
|
||||
Node* orig_tail = _gvn.transform(new SubINode(orig_length, start));
|
||||
Node* moved = generate_min_max(vmIntrinsics::_min, orig_tail, length);
|
||||
|
||||
original = access_resolve(original, ACCESS_READ);
|
||||
|
||||
// Generate a direct call to the right arraycopy function(s).
|
||||
// We know the copy is disjoint but we might not know if the
|
||||
// oop stores need checking.
|
||||
@ -4185,8 +4153,6 @@ bool LibraryCallKit::inline_unsafe_copyMemory() {
|
||||
assert(Unsafe_field_offset_to_byte_offset(11) == 11,
|
||||
"fieldOffset must be byte-scaled");
|
||||
|
||||
src_ptr = access_resolve(src_ptr, ACCESS_READ);
|
||||
dst_ptr = access_resolve(dst_ptr, ACCESS_WRITE);
|
||||
Node* src = make_unsafe_address(src_ptr, src_off, ACCESS_READ);
|
||||
Node* dst = make_unsafe_address(dst_ptr, dst_off, ACCESS_WRITE);
|
||||
|
||||
@ -4341,7 +4307,6 @@ bool LibraryCallKit::inline_native_clone(bool is_virtual) {
|
||||
if (is_obja != NULL) {
|
||||
PreserveJVMState pjvms2(this);
|
||||
set_control(is_obja);
|
||||
obj = access_resolve(obj, ACCESS_READ);
|
||||
// Generate a direct call to the right arraycopy function(s).
|
||||
Node* alloc = tightly_coupled_allocation(alloc_obj, NULL);
|
||||
ArrayCopyNode* ac = ArrayCopyNode::make(this, true, obj, intcon(0), alloc_obj, intcon(0), obj_length, alloc != NULL, false);
|
||||
@ -4818,10 +4783,7 @@ bool LibraryCallKit::inline_arraycopy() {
|
||||
return true;
|
||||
}
|
||||
|
||||
Node* new_src = access_resolve(src, ACCESS_READ);
|
||||
Node* new_dest = access_resolve(dest, ACCESS_WRITE);
|
||||
|
||||
ArrayCopyNode* ac = ArrayCopyNode::make(this, true, new_src, src_offset, new_dest, dest_offset, length, alloc != NULL, negative_length_guard_generated,
|
||||
ArrayCopyNode* ac = ArrayCopyNode::make(this, true, src, src_offset, dest, dest_offset, length, alloc != NULL, negative_length_guard_generated,
|
||||
// Create LoadRange and LoadKlass nodes for use during macro expansion here
|
||||
// so the compiler has a chance to eliminate them: during macro expansion,
|
||||
// we have to set their control (CastPP nodes are eliminated).
|
||||
@ -4934,9 +4896,6 @@ bool LibraryCallKit::inline_encodeISOArray() {
|
||||
src = must_be_not_null(src, true);
|
||||
dst = must_be_not_null(dst, true);
|
||||
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
dst = access_resolve(dst, ACCESS_WRITE);
|
||||
|
||||
const Type* src_type = src->Value(&_gvn);
|
||||
const Type* dst_type = dst->Value(&_gvn);
|
||||
const TypeAryPtr* top_src = src_type->isa_aryptr();
|
||||
@ -4992,10 +4951,6 @@ bool LibraryCallKit::inline_multiplyToLen() {
|
||||
x = must_be_not_null(x, true);
|
||||
y = must_be_not_null(y, true);
|
||||
|
||||
x = access_resolve(x, ACCESS_READ);
|
||||
y = access_resolve(y, ACCESS_READ);
|
||||
z = access_resolve(z, ACCESS_WRITE);
|
||||
|
||||
const Type* x_type = x->Value(&_gvn);
|
||||
const Type* y_type = y->Value(&_gvn);
|
||||
const TypeAryPtr* top_x = x_type->isa_aryptr();
|
||||
@ -5104,9 +5059,6 @@ bool LibraryCallKit::inline_squareToLen() {
|
||||
x = must_be_not_null(x, true);
|
||||
z = must_be_not_null(z, true);
|
||||
|
||||
x = access_resolve(x, ACCESS_READ);
|
||||
z = access_resolve(z, ACCESS_WRITE);
|
||||
|
||||
const Type* x_type = x->Value(&_gvn);
|
||||
const Type* z_type = z->Value(&_gvn);
|
||||
const TypeAryPtr* top_x = x_type->isa_aryptr();
|
||||
@ -5156,9 +5108,6 @@ bool LibraryCallKit::inline_mulAdd() {
|
||||
|
||||
out = must_be_not_null(out, true);
|
||||
|
||||
in = access_resolve(in, ACCESS_READ);
|
||||
out = access_resolve(out, ACCESS_WRITE);
|
||||
|
||||
const Type* out_type = out->Value(&_gvn);
|
||||
const Type* in_type = in->Value(&_gvn);
|
||||
const TypeAryPtr* top_out = out_type->isa_aryptr();
|
||||
@ -5208,11 +5157,6 @@ bool LibraryCallKit::inline_montgomeryMultiply() {
|
||||
Node* inv = argument(4);
|
||||
Node* m = argument(6);
|
||||
|
||||
a = access_resolve(a, ACCESS_READ);
|
||||
b = access_resolve(b, ACCESS_READ);
|
||||
n = access_resolve(n, ACCESS_READ);
|
||||
m = access_resolve(m, ACCESS_WRITE);
|
||||
|
||||
const Type* a_type = a->Value(&_gvn);
|
||||
const TypeAryPtr* top_a = a_type->isa_aryptr();
|
||||
const Type* b_type = b->Value(&_gvn);
|
||||
@ -5272,10 +5216,6 @@ bool LibraryCallKit::inline_montgomerySquare() {
|
||||
Node* inv = argument(3);
|
||||
Node* m = argument(5);
|
||||
|
||||
a = access_resolve(a, ACCESS_READ);
|
||||
n = access_resolve(n, ACCESS_READ);
|
||||
m = access_resolve(m, ACCESS_WRITE);
|
||||
|
||||
const Type* a_type = a->Value(&_gvn);
|
||||
const TypeAryPtr* top_a = a_type->isa_aryptr();
|
||||
const Type* n_type = a->Value(&_gvn);
|
||||
@ -5345,8 +5285,6 @@ bool LibraryCallKit::inline_vectorizedMismatch() {
|
||||
Node* call;
|
||||
jvms()->set_should_reexecute(true);
|
||||
|
||||
obja = access_resolve(obja, ACCESS_READ);
|
||||
objb = access_resolve(objb, ACCESS_READ);
|
||||
Node* obja_adr = make_unsafe_address(obja, aoffset, ACCESS_READ);
|
||||
Node* objb_adr = make_unsafe_address(objb, boffset, ACCESS_READ);
|
||||
|
||||
@ -5423,7 +5361,6 @@ bool LibraryCallKit::inline_updateBytesCRC32() {
|
||||
|
||||
// 'src_start' points to src array + scaled offset
|
||||
src = must_be_not_null(src, true);
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
Node* src_start = array_element_address(src, offset, src_elem);
|
||||
|
||||
// We assume that range check is done by caller.
|
||||
@ -5513,13 +5450,11 @@ bool LibraryCallKit::inline_updateBytesCRC32C() {
|
||||
|
||||
// 'src_start' points to src array + scaled offset
|
||||
src = must_be_not_null(src, true);
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
Node* src_start = array_element_address(src, offset, src_elem);
|
||||
|
||||
// static final int[] byteTable in class CRC32C
|
||||
Node* table = get_table_from_crc32c_class(callee()->holder());
|
||||
table = must_be_not_null(table, true);
|
||||
table = access_resolve(table, ACCESS_READ);
|
||||
Node* table_start = array_element_address(table, intcon(0), T_INT);
|
||||
|
||||
// We assume that range check is done by caller.
|
||||
@ -5564,7 +5499,6 @@ bool LibraryCallKit::inline_updateDirectByteBufferCRC32C() {
|
||||
// static final int[] byteTable in class CRC32C
|
||||
Node* table = get_table_from_crc32c_class(callee()->holder());
|
||||
table = must_be_not_null(table, true);
|
||||
table = access_resolve(table, ACCESS_READ);
|
||||
Node* table_start = array_element_address(table, intcon(0), T_INT);
|
||||
|
||||
// Call the stub.
|
||||
@ -5608,7 +5542,6 @@ bool LibraryCallKit::inline_updateBytesAdler32() {
|
||||
}
|
||||
|
||||
// 'src_start' points to src array + scaled offset
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
Node* src_start = array_element_address(src, offset, src_elem);
|
||||
|
||||
// We assume that range check is done by caller.
|
||||
@ -5812,9 +5745,6 @@ bool LibraryCallKit::inline_aescrypt_Block(vmIntrinsics::ID id) {
|
||||
src = must_be_not_null(src, true);
|
||||
dest = must_be_not_null(dest, true);
|
||||
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
dest = access_resolve(dest, ACCESS_WRITE);
|
||||
|
||||
// (1) src and dest are arrays.
|
||||
const Type* src_type = src->Value(&_gvn);
|
||||
const Type* dest_type = dest->Value(&_gvn);
|
||||
@ -5888,9 +5818,6 @@ bool LibraryCallKit::inline_cipherBlockChaining_AESCrypt(vmIntrinsics::ID id) {
|
||||
src = must_be_not_null(src, false);
|
||||
dest = must_be_not_null(dest, false);
|
||||
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
dest = access_resolve(dest, ACCESS_WRITE);
|
||||
|
||||
// (1) src and dest are arrays.
|
||||
const Type* src_type = src->Value(&_gvn);
|
||||
const Type* dest_type = dest->Value(&_gvn);
|
||||
@ -5936,7 +5863,6 @@ bool LibraryCallKit::inline_cipherBlockChaining_AESCrypt(vmIntrinsics::ID id) {
|
||||
// similarly, get the start address of the r vector
|
||||
Node* objRvec = load_field_from_object(cipherBlockChaining_object, "r", "[B", /*is_exact*/ false);
|
||||
if (objRvec == NULL) return false;
|
||||
objRvec = access_resolve(objRvec, ACCESS_WRITE);
|
||||
Node* r_start = array_element_address(objRvec, intcon(0), T_BYTE);
|
||||
|
||||
Node* cbcCrypt;
|
||||
@ -6073,10 +5999,6 @@ bool LibraryCallKit::inline_counterMode_AESCrypt(vmIntrinsics::ID id) {
|
||||
Node* dest = argument(4);
|
||||
Node* dest_offset = argument(5);
|
||||
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
dest = access_resolve(dest, ACCESS_WRITE);
|
||||
counterMode_object = access_resolve(counterMode_object, ACCESS_WRITE);
|
||||
|
||||
// (1) src and dest are arrays.
|
||||
const Type* src_type = src->Value(&_gvn);
|
||||
const Type* dest_type = dest->Value(&_gvn);
|
||||
@ -6117,12 +6039,10 @@ bool LibraryCallKit::inline_counterMode_AESCrypt(vmIntrinsics::ID id) {
|
||||
// similarly, get the start address of the r vector
|
||||
Node* obj_counter = load_field_from_object(counterMode_object, "counter", "[B", /*is_exact*/ false);
|
||||
if (obj_counter == NULL) return false;
|
||||
obj_counter = access_resolve(obj_counter, ACCESS_WRITE);
|
||||
Node* cnt_start = array_element_address(obj_counter, intcon(0), T_BYTE);
|
||||
|
||||
Node* saved_encCounter = load_field_from_object(counterMode_object, "encryptedCounter", "[B", /*is_exact*/ false);
|
||||
if (saved_encCounter == NULL) return false;
|
||||
saved_encCounter = access_resolve(saved_encCounter, ACCESS_WRITE);
|
||||
Node* saved_encCounter_start = array_element_address(saved_encCounter, intcon(0), T_BYTE);
|
||||
Node* used = field_address_from_object(counterMode_object, "used", "I", /*is_exact*/ false);
|
||||
|
||||
@ -6163,7 +6083,6 @@ Node * LibraryCallKit::get_key_start_from_aescrypt_object(Node *aescrypt_object)
|
||||
if (objAESCryptKey == NULL) return (Node *) NULL;
|
||||
|
||||
// now have the array, need to get the start address of the K array
|
||||
objAESCryptKey = access_resolve(objAESCryptKey, ACCESS_READ);
|
||||
Node* k_start = array_element_address(objAESCryptKey, intcon(0), T_INT);
|
||||
return k_start;
|
||||
}
|
||||
@ -6175,7 +6094,6 @@ Node * LibraryCallKit::get_original_key_start_from_aescrypt_object(Node *aescryp
|
||||
if (objAESCryptKey == NULL) return (Node *) NULL;
|
||||
|
||||
// now have the array, need to get the start address of the lastKey array
|
||||
objAESCryptKey = access_resolve(objAESCryptKey, ACCESS_READ);
|
||||
Node* original_k_start = array_element_address(objAESCryptKey, intcon(0), T_BYTE);
|
||||
return original_k_start;
|
||||
}
|
||||
@ -6219,9 +6137,6 @@ Node* LibraryCallKit::inline_cipherBlockChaining_AESCrypt_predicate(bool decrypt
|
||||
dest = must_be_not_null(dest, true);
|
||||
|
||||
// Resolve oops to stable for CmpP below.
|
||||
src = access_resolve(src, 0);
|
||||
dest = access_resolve(dest, 0);
|
||||
|
||||
ciInstanceKlass* instklass_AESCrypt = klass_AESCrypt->as_instance_klass();
|
||||
|
||||
Node* instof = gen_instanceof(embeddedCipherObj, makecon(TypeKlassPtr::make(instklass_AESCrypt)));
|
||||
@ -6369,10 +6284,6 @@ bool LibraryCallKit::inline_ghash_processBlocks() {
|
||||
subkeyH = must_be_not_null(subkeyH, true);
|
||||
data = must_be_not_null(data, true);
|
||||
|
||||
state = access_resolve(state, ACCESS_WRITE);
|
||||
subkeyH = access_resolve(subkeyH, ACCESS_READ);
|
||||
data = access_resolve(data, ACCESS_READ);
|
||||
|
||||
Node* state_start = array_element_address(state, intcon(0), T_LONG);
|
||||
assert(state_start, "state is NULL");
|
||||
Node* subkeyH_start = array_element_address(subkeyH, intcon(0), T_LONG);
|
||||
@ -6405,9 +6316,7 @@ bool LibraryCallKit::inline_base64_encodeBlock() {
|
||||
Node* isURL = argument(6);
|
||||
|
||||
src = must_be_not_null(src, true);
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
dest = must_be_not_null(dest, true);
|
||||
dest = access_resolve(dest, ACCESS_WRITE);
|
||||
|
||||
Node* src_start = array_element_address(src, intcon(0), T_BYTE);
|
||||
assert(src_start, "source array is NULL");
|
||||
@ -6452,7 +6361,6 @@ bool LibraryCallKit::inline_sha_implCompress(vmIntrinsics::ID id) {
|
||||
}
|
||||
// 'src_start' points to src array + offset
|
||||
src = must_be_not_null(src, true);
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
Node* src_start = array_element_address(src, ofs, src_elem);
|
||||
Node* state = NULL;
|
||||
address stubAddr;
|
||||
@ -6523,7 +6431,6 @@ bool LibraryCallKit::inline_digestBase_implCompressMB(int predicate) {
|
||||
}
|
||||
// 'src_start' points to src array + offset
|
||||
src = must_be_not_null(src, false);
|
||||
src = access_resolve(src, ACCESS_READ);
|
||||
Node* src_start = array_element_address(src, ofs, src_elem);
|
||||
|
||||
const char* klass_SHA_name = NULL;
|
||||
@ -6609,7 +6516,6 @@ Node * LibraryCallKit::get_state_from_sha_object(Node *sha_object) {
|
||||
if (sha_state == NULL) return (Node *) NULL;
|
||||
|
||||
// now have the array, need to get the start address of the state array
|
||||
sha_state = access_resolve(sha_state, ACCESS_WRITE);
|
||||
Node* state = array_element_address(sha_state, intcon(0), T_INT);
|
||||
return state;
|
||||
}
|
||||
@ -6621,7 +6527,6 @@ Node * LibraryCallKit::get_state_from_sha5_object(Node *sha_object) {
|
||||
if (sha_state == NULL) return (Node *) NULL;
|
||||
|
||||
// now have the array, need to get the start address of the state array
|
||||
sha_state = access_resolve(sha_state, ACCESS_WRITE);
|
||||
Node* state = array_element_address(sha_state, intcon(0), T_LONG);
|
||||
return state;
|
||||
}
|
||||
|
@ -1802,7 +1802,7 @@ void IdealLoopTree::split_fall_in( PhaseIdealLoop *phase, int fall_in_cnt ) {
|
||||
// disappear it. In JavaGrande I have a case where this useless
|
||||
// Phi is the loop limit and prevents recognizing a CountedLoop
|
||||
// which in turn prevents removing an empty loop.
|
||||
Node *id_old_phi = igvn.apply_identity(old_phi);
|
||||
Node *id_old_phi = old_phi->Identity(&igvn);
|
||||
if( id_old_phi != old_phi ) { // Found a simple identity?
|
||||
// Note that I cannot call 'replace_node' here, because
|
||||
// that will yank the edge from old_phi to the Region and
|
||||
@ -4269,12 +4269,6 @@ void PhaseIdealLoop::verify_strip_mined_scheduling(Node *n, Node* least) {
|
||||
// Put Data nodes into some loop nest, by setting the _nodes[]->loop mapping.
|
||||
// Second pass finds latest legal placement, and ideal loop placement.
|
||||
void PhaseIdealLoop::build_loop_late_post(Node *n) {
|
||||
BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
|
||||
|
||||
if (bs->build_loop_late_post(this, n)) {
|
||||
return;
|
||||
}
|
||||
|
||||
build_loop_late_post_work(n, true);
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
|
||||
// otherwise it will be not updated during igvn->transform since
|
||||
// igvn->type(x) is set to x->Value() already.
|
||||
x->raise_bottom_type(t);
|
||||
Node *y = _igvn.apply_identity(x);
|
||||
Node* y = x->Identity(&_igvn);
|
||||
if (y != x) {
|
||||
wins++;
|
||||
x = y;
|
||||
@ -941,11 +941,6 @@ void PhaseIdealLoop::try_move_store_after_loop(Node* n) {
|
||||
// Do the real work in a non-recursive function. Data nodes want to be
|
||||
// cloned in the pre-order so they can feed each other nicely.
|
||||
Node *PhaseIdealLoop::split_if_with_blocks_pre( Node *n ) {
|
||||
BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
|
||||
Node* bs_res = bs->split_if_pre(this, n);
|
||||
if (bs_res != NULL) {
|
||||
return bs_res;
|
||||
}
|
||||
// Cloning these guys is unlikely to win
|
||||
int n_op = n->Opcode();
|
||||
if( n_op == Op_MergeMem ) return n;
|
||||
@ -1389,7 +1384,6 @@ void PhaseIdealLoop::split_if_with_blocks_post(Node *n) {
|
||||
// control, then the cloning of n is a pointless exercise, because
|
||||
// GVN will ensure that we end up where we started.
|
||||
if (!n->is_Load() || late_load_ctrl != n_ctrl) {
|
||||
BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
|
||||
for (DUIterator_Last jmin, j = n->last_outs(jmin); j >= jmin; ) {
|
||||
Node *u = n->last_out(j); // Clone private computation per use
|
||||
_igvn.rehash_node_delayed(u);
|
||||
@ -1420,10 +1414,6 @@ void PhaseIdealLoop::split_if_with_blocks_post(Node *n) {
|
||||
// For inner loop uses get the preheader area.
|
||||
x_ctrl = place_near_use(x_ctrl);
|
||||
|
||||
if (bs->sink_node(this, n, x, x_ctrl, n_ctrl)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (n->is_Load()) {
|
||||
// For loads, add a control edge to a CFG node outside of the loop
|
||||
// to force them to not combine and return back inside the loop
|
||||
|
@ -1033,13 +1033,7 @@ void PhaseMacroExpand::process_users_of_allocation(CallNode *alloc) {
|
||||
if (ctrl_proj != NULL) {
|
||||
_igvn.replace_node(ctrl_proj, init->in(TypeFunc::Control));
|
||||
#ifdef ASSERT
|
||||
BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
|
||||
Node* tmp = init->in(TypeFunc::Control);
|
||||
while (bs->is_gc_barrier_node(tmp)) {
|
||||
Node* tmp2 = bs->step_over_gc_barrier_ctrl(tmp);
|
||||
assert(tmp != tmp2, "Must make progress");
|
||||
tmp = tmp2;
|
||||
}
|
||||
assert(tmp == _fallthroughcatchproj, "allocation control projection");
|
||||
#endif
|
||||
}
|
||||
|
@ -2064,11 +2064,8 @@ void Matcher::find_shared( Node *n ) {
|
||||
set_visited(n); // Flag as visited now
|
||||
bool mem_op = false;
|
||||
int mem_addr_idx = MemNode::Address;
|
||||
bool gc_handled = BarrierSet::barrier_set()->barrier_set_c2()->matcher_find_shared_visit(this, mstack, n, nop, mem_op, mem_addr_idx);
|
||||
if (!gc_handled) {
|
||||
if (find_shared_visit(mstack, n, nop, mem_op, mem_addr_idx)) {
|
||||
continue;
|
||||
}
|
||||
if (find_shared_visit(mstack, n, nop, mem_op, mem_addr_idx)) {
|
||||
continue;
|
||||
}
|
||||
for(int i = n->req() - 1; i >= 0; --i) { // For my children
|
||||
Node *m = n->in(i); // Get ith input
|
||||
|
@ -1438,8 +1438,9 @@ Node *LoadNode::split_through_phi(PhaseGVN *phase) {
|
||||
|
||||
// Do nothing here if Identity will find a value
|
||||
// (to avoid infinite chain of value phis generation).
|
||||
if (!phase->eqv(this, phase->apply_identity(this)))
|
||||
if (!phase->eqv(this, this->Identity(phase))) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Select Region to split through.
|
||||
Node* region;
|
||||
@ -1528,7 +1529,7 @@ Node *LoadNode::split_through_phi(PhaseGVN *phase) {
|
||||
// otherwise it will be not updated during igvn->transform since
|
||||
// igvn->type(x) is set to x->Value() already.
|
||||
x->raise_bottom_type(t);
|
||||
Node *y = igvn->apply_identity(x);
|
||||
Node* y = x->Identity(igvn);
|
||||
if (y != x) {
|
||||
x = y;
|
||||
} else {
|
||||
|
@ -1166,7 +1166,7 @@ bool Node::has_special_unique_user() const {
|
||||
// See IfProjNode::Identity()
|
||||
return true;
|
||||
} else {
|
||||
return BarrierSet::barrier_set()->barrier_set_c2()->has_special_unique_user(this);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -2747,8 +2747,8 @@ void Parse::do_one_bytecode() {
|
||||
handle_if_acmp:
|
||||
// If this is a backwards branch in the bytecodes, add Safepoint
|
||||
maybe_add_safepoint(iter().get_dest());
|
||||
a = access_resolve(pop(), 0);
|
||||
b = access_resolve(pop(), 0);
|
||||
a = pop();
|
||||
b = pop();
|
||||
c = _gvn.transform( new CmpPNode(b, a) );
|
||||
c = optimize_cmp_with_klass(c);
|
||||
do_if(btest, c);
|
||||
|
@ -808,14 +808,6 @@ Node* PhaseGVN::apply_ideal(Node* k, bool can_reshape) {
|
||||
return i;
|
||||
}
|
||||
|
||||
Node* PhaseGVN::apply_identity(Node* k) {
|
||||
Node* i = BarrierSet::barrier_set()->barrier_set_c2()->identity_node(this, k);
|
||||
if (i == k) {
|
||||
i = k->Identity(this);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
//------------------------------transform--------------------------------------
|
||||
// Return a node which computes the same function as this node, but in a
|
||||
// faster or cheaper fashion.
|
||||
@ -870,7 +862,7 @@ Node *PhaseGVN::transform_no_reclaim( Node *n ) {
|
||||
}
|
||||
|
||||
// Now check for Identities
|
||||
Node *i = apply_identity(k); // Look for a nearby replacement
|
||||
Node *i = k->Identity(this); // Look for a nearby replacement
|
||||
if( i != k ) { // Found? Return replacement!
|
||||
NOT_PRODUCT( set_progress(); )
|
||||
return i;
|
||||
@ -1299,7 +1291,7 @@ Node *PhaseIterGVN::transform_old(Node* n) {
|
||||
}
|
||||
|
||||
// Now check for Identities
|
||||
i = apply_identity(k); // Look for a nearby replacement
|
||||
i = k->Identity(this); // Look for a nearby replacement
|
||||
if (i != k) { // Found? Return replacement!
|
||||
NOT_PRODUCT(set_progress();)
|
||||
add_users_to_worklist(k);
|
||||
@ -1669,8 +1661,6 @@ void PhaseIterGVN::add_users_to_worklist( Node *n ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BarrierSet::barrier_set()->barrier_set_c2()->igvn_add_users_to_worklist(this, use);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1829,8 +1819,6 @@ void PhaseCCP::analyze() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BarrierSet::barrier_set()->barrier_set_c2()->ccp_analyze(this, worklist, m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -436,9 +436,6 @@ public:
|
||||
// Helper to call Node::Ideal() and BarrierSetC2::ideal_node().
|
||||
Node* apply_ideal(Node* i, bool can_reshape);
|
||||
|
||||
// Helper to call Node::Identity() and BarrierSetC2::identity_node().
|
||||
Node* apply_identity(Node* n);
|
||||
|
||||
// Check for a simple dead loop when a data node references itself.
|
||||
DEBUG_ONLY(void dead_loop_check(Node *n);)
|
||||
};
|
||||
|
@ -1212,7 +1212,6 @@ Node* PhaseStringOpts::int_stringSize(GraphKit& kit, Node* arg) {
|
||||
kit.set_control(loop);
|
||||
Node* sizeTable = fetch_static_field(kit, size_table_field);
|
||||
|
||||
sizeTable = kit.access_resolve(sizeTable, ACCESS_READ);
|
||||
Node* value = kit.load_array_element(NULL, sizeTable, index, TypeAryPtr::INTS);
|
||||
C->record_for_igvn(value);
|
||||
Node* limit = __ CmpI(phi, value);
|
||||
@ -1548,7 +1547,6 @@ void PhaseStringOpts::copy_constant_string(GraphKit& kit, IdealKit& ideal, ciTyp
|
||||
// Compress copy contents of the byte/char String str into dst_array starting at index start.
|
||||
Node* PhaseStringOpts::copy_string(GraphKit& kit, Node* str, Node* dst_array, Node* dst_coder, Node* start) {
|
||||
Node* src_array = kit.load_String_value(str, true);
|
||||
src_array = kit.access_resolve(src_array, ACCESS_READ);
|
||||
|
||||
IdealKit ideal(&kit, true, true);
|
||||
IdealVariable count(ideal); __ declarations_done();
|
||||
|
Loading…
x
Reference in New Issue
Block a user