mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
Merge
This commit is contained in:
commit
a51ff63df7
229 changed files with 11445 additions and 4951 deletions
|
@ -1457,18 +1457,22 @@ void GraphKit::set_all_memory_call(Node* call, bool separate_io_proj) {
|
|||
// factory methods in "int adr_idx"
|
||||
Node* GraphKit::make_load(Node* ctl, Node* adr, const Type* t, BasicType bt,
|
||||
int adr_idx,
|
||||
MemNode::MemOrd mo, LoadNode::ControlDependency control_dependency, bool require_atomic_access) {
|
||||
MemNode::MemOrd mo,
|
||||
LoadNode::ControlDependency control_dependency,
|
||||
bool require_atomic_access,
|
||||
bool unaligned,
|
||||
bool mismatched) {
|
||||
assert(adr_idx != Compile::AliasIdxTop, "use other make_load factory" );
|
||||
const TypePtr* adr_type = NULL; // debug-mode-only argument
|
||||
debug_only(adr_type = C->get_adr_type(adr_idx));
|
||||
Node* mem = memory(adr_idx);
|
||||
Node* ld;
|
||||
if (require_atomic_access && bt == T_LONG) {
|
||||
ld = LoadLNode::make_atomic(ctl, mem, adr, adr_type, t, mo, control_dependency);
|
||||
ld = LoadLNode::make_atomic(ctl, mem, adr, adr_type, t, mo, control_dependency, unaligned, mismatched);
|
||||
} else if (require_atomic_access && bt == T_DOUBLE) {
|
||||
ld = LoadDNode::make_atomic(ctl, mem, adr, adr_type, t, mo, control_dependency);
|
||||
ld = LoadDNode::make_atomic(ctl, mem, adr, adr_type, t, mo, control_dependency, unaligned, mismatched);
|
||||
} else {
|
||||
ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo, control_dependency);
|
||||
ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo, control_dependency, unaligned, mismatched);
|
||||
}
|
||||
ld = _gvn.transform(ld);
|
||||
if ((bt == T_OBJECT) && C->do_escape_analysis() || C->eliminate_boxing()) {
|
||||
|
@ -1481,7 +1485,9 @@ Node* GraphKit::make_load(Node* ctl, Node* adr, const Type* t, BasicType bt,
|
|||
Node* GraphKit::store_to_memory(Node* ctl, Node* adr, Node *val, BasicType bt,
|
||||
int adr_idx,
|
||||
MemNode::MemOrd mo,
|
||||
bool require_atomic_access) {
|
||||
bool require_atomic_access,
|
||||
bool unaligned,
|
||||
bool mismatched) {
|
||||
assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
|
||||
const TypePtr* adr_type = NULL;
|
||||
debug_only(adr_type = C->get_adr_type(adr_idx));
|
||||
|
@ -1494,6 +1500,12 @@ Node* GraphKit::store_to_memory(Node* ctl, Node* adr, Node *val, BasicType bt,
|
|||
} else {
|
||||
st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt, mo);
|
||||
}
|
||||
if (unaligned) {
|
||||
st->as_Store()->set_unaligned_access();
|
||||
}
|
||||
if (mismatched) {
|
||||
st->as_Store()->set_mismatched_access();
|
||||
}
|
||||
st = _gvn.transform(st);
|
||||
set_memory(st, adr_idx);
|
||||
// Back-to-back stores can only remove intermediate store with DU info
|
||||
|
@ -1587,7 +1599,8 @@ Node* GraphKit::store_oop(Node* ctl,
|
|||
const TypeOopPtr* val_type,
|
||||
BasicType bt,
|
||||
bool use_precise,
|
||||
MemNode::MemOrd mo) {
|
||||
MemNode::MemOrd mo,
|
||||
bool mismatched) {
|
||||
// Transformation of a value which could be NULL pointer (CastPP #NULL)
|
||||
// could be delayed during Parse (for example, in adjust_map_after_if()).
|
||||
// Execute transformation here to avoid barrier generation in such case.
|
||||
|
@ -1607,7 +1620,7 @@ Node* GraphKit::store_oop(Node* ctl,
|
|||
NULL /* pre_val */,
|
||||
bt);
|
||||
|
||||
Node* store = store_to_memory(control(), adr, val, bt, adr_idx, mo);
|
||||
Node* store = store_to_memory(control(), adr, val, bt, adr_idx, mo, mismatched);
|
||||
post_barrier(control(), store, obj, adr, adr_idx, val, bt, use_precise);
|
||||
return store;
|
||||
}
|
||||
|
@ -1619,7 +1632,8 @@ Node* GraphKit::store_oop_to_unknown(Node* ctl,
|
|||
const TypePtr* adr_type,
|
||||
Node* val,
|
||||
BasicType bt,
|
||||
MemNode::MemOrd mo) {
|
||||
MemNode::MemOrd mo,
|
||||
bool mismatched) {
|
||||
Compile::AliasType* at = C->alias_type(adr_type);
|
||||
const TypeOopPtr* val_type = NULL;
|
||||
if (adr_type->isa_instptr()) {
|
||||
|
@ -1638,7 +1652,7 @@ Node* GraphKit::store_oop_to_unknown(Node* ctl,
|
|||
if (val_type == NULL) {
|
||||
val_type = TypeInstPtr::BOTTOM;
|
||||
}
|
||||
return store_oop(ctl, obj, adr, adr_type, val, val_type, bt, true, mo);
|
||||
return store_oop(ctl, obj, adr, adr_type, val, val_type, bt, true, mo, mismatched);
|
||||
}
|
||||
|
||||
|
||||
|
@ -4373,7 +4387,8 @@ void GraphKit::inflate_string_slow(Node* src, Node* dst, Node* start, Node* coun
|
|||
set_memory(mem, TypeAryPtr::BYTES);
|
||||
Node* ch = load_array_element(control(), src, i_byte, TypeAryPtr::BYTES);
|
||||
Node* st = store_to_memory(control(), array_element_address(dst, i_char, T_BYTE),
|
||||
AndI(ch, intcon(0xff)), T_CHAR, TypeAryPtr::BYTES, MemNode::unordered);
|
||||
AndI(ch, intcon(0xff)), T_CHAR, TypeAryPtr::BYTES, MemNode::unordered,
|
||||
false, false, true /* mismatched */);
|
||||
|
||||
IfNode* iff = create_and_map_if(head, Bool(CmpI(i_byte, count), BoolTest::lt), PROB_FAIR, COUNT_UNKNOWN);
|
||||
head->init_req(2, IfTrue(iff));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue