Mercurial > hg > truffle
comparison src/share/vm/opto/graphKit.cpp @ 17812:a7d4d4655766
Merge
author | kvn |
---|---|
date | Wed, 26 Mar 2014 18:21:05 -0700 |
parents | 62c54fcc0a35 |
children | 00c8a1255912 |
comparison
equal
deleted
inserted
replaced
17789:6b207d038106 | 17812:a7d4d4655766 |
---|---|
492 // take the uncommon_trap in the BuildCutout below. | 492 // take the uncommon_trap in the BuildCutout below. |
493 | 493 |
494 // first must access the should_post_on_exceptions_flag in this thread's JavaThread | 494 // first must access the should_post_on_exceptions_flag in this thread's JavaThread |
495 Node* jthread = _gvn.transform(new (C) ThreadLocalNode()); | 495 Node* jthread = _gvn.transform(new (C) ThreadLocalNode()); |
496 Node* adr = basic_plus_adr(top(), jthread, in_bytes(JavaThread::should_post_on_exceptions_flag_offset())); | 496 Node* adr = basic_plus_adr(top(), jthread, in_bytes(JavaThread::should_post_on_exceptions_flag_offset())); |
497 Node* should_post_flag = make_load(control(), adr, TypeInt::INT, T_INT, Compile::AliasIdxRaw, false); | 497 Node* should_post_flag = make_load(control(), adr, TypeInt::INT, T_INT, Compile::AliasIdxRaw, MemNode::unordered); |
498 | 498 |
499 // Test the should_post_on_exceptions_flag vs. 0 | 499 // Test the should_post_on_exceptions_flag vs. 0 |
500 Node* chk = _gvn.transform( new (C) CmpINode(should_post_flag, intcon(0)) ); | 500 Node* chk = _gvn.transform( new (C) CmpINode(should_post_flag, intcon(0)) ); |
501 Node* tst = _gvn.transform( new (C) BoolNode(chk, BoolTest::eq) ); | 501 Node* tst = _gvn.transform( new (C) BoolNode(chk, BoolTest::eq) ); |
502 | 502 |
594 int offset = java_lang_Throwable::get_detailMessage_offset(); | 594 int offset = java_lang_Throwable::get_detailMessage_offset(); |
595 const TypePtr* adr_typ = ex_con->add_offset(offset); | 595 const TypePtr* adr_typ = ex_con->add_offset(offset); |
596 | 596 |
597 Node *adr = basic_plus_adr(ex_node, ex_node, offset); | 597 Node *adr = basic_plus_adr(ex_node, ex_node, offset); |
598 const TypeOopPtr* val_type = TypeOopPtr::make_from_klass(env()->String_klass()); | 598 const TypeOopPtr* val_type = TypeOopPtr::make_from_klass(env()->String_klass()); |
599 Node *store = store_oop_to_object(control(), ex_node, adr, adr_typ, null(), val_type, T_OBJECT); | 599 // Conservatively release stores of object references. |
600 Node *store = store_oop_to_object(control(), ex_node, adr, adr_typ, null(), val_type, T_OBJECT, MemNode::release); | |
600 | 601 |
601 add_exception_state(make_exception_state(ex_node)); | 602 add_exception_state(make_exception_state(ex_node)); |
602 return; | 603 return; |
603 } | 604 } |
604 } | 605 } |
1493 // | 1494 // |
1494 | 1495 |
1495 // factory methods in "int adr_idx" | 1496 // factory methods in "int adr_idx" |
1496 Node* GraphKit::make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, | 1497 Node* GraphKit::make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, |
1497 int adr_idx, | 1498 int adr_idx, |
1498 bool require_atomic_access) { | 1499 MemNode::MemOrd mo, bool require_atomic_access) { |
1499 assert(adr_idx != Compile::AliasIdxTop, "use other make_load factory" ); | 1500 assert(adr_idx != Compile::AliasIdxTop, "use other make_load factory" ); |
1500 const TypePtr* adr_type = NULL; // debug-mode-only argument | 1501 const TypePtr* adr_type = NULL; // debug-mode-only argument |
1501 debug_only(adr_type = C->get_adr_type(adr_idx)); | 1502 debug_only(adr_type = C->get_adr_type(adr_idx)); |
1502 Node* mem = memory(adr_idx); | 1503 Node* mem = memory(adr_idx); |
1503 Node* ld; | 1504 Node* ld; |
1504 if (require_atomic_access && bt == T_LONG) { | 1505 if (require_atomic_access && bt == T_LONG) { |
1505 ld = LoadLNode::make_atomic(C, ctl, mem, adr, adr_type, t); | 1506 ld = LoadLNode::make_atomic(C, ctl, mem, adr, adr_type, t, mo); |
1506 } else { | 1507 } else { |
1507 ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt); | 1508 ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo); |
1508 } | 1509 } |
1509 ld = _gvn.transform(ld); | 1510 ld = _gvn.transform(ld); |
1510 if ((bt == T_OBJECT) && C->do_escape_analysis() || C->eliminate_boxing()) { | 1511 if ((bt == T_OBJECT) && C->do_escape_analysis() || C->eliminate_boxing()) { |
1511 // Improve graph before escape analysis and boxing elimination. | 1512 // Improve graph before escape analysis and boxing elimination. |
1512 record_for_igvn(ld); | 1513 record_for_igvn(ld); |
1514 return ld; | 1515 return ld; |
1515 } | 1516 } |
1516 | 1517 |
1517 Node* GraphKit::store_to_memory(Node* ctl, Node* adr, Node *val, BasicType bt, | 1518 Node* GraphKit::store_to_memory(Node* ctl, Node* adr, Node *val, BasicType bt, |
1518 int adr_idx, | 1519 int adr_idx, |
1520 MemNode::MemOrd mo, | |
1519 bool require_atomic_access) { | 1521 bool require_atomic_access) { |
1520 assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" ); | 1522 assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" ); |
1521 const TypePtr* adr_type = NULL; | 1523 const TypePtr* adr_type = NULL; |
1522 debug_only(adr_type = C->get_adr_type(adr_idx)); | 1524 debug_only(adr_type = C->get_adr_type(adr_idx)); |
1523 Node *mem = memory(adr_idx); | 1525 Node *mem = memory(adr_idx); |
1524 Node* st; | 1526 Node* st; |
1525 if (require_atomic_access && bt == T_LONG) { | 1527 if (require_atomic_access && bt == T_LONG) { |
1526 st = StoreLNode::make_atomic(C, ctl, mem, adr, adr_type, val); | 1528 st = StoreLNode::make_atomic(C, ctl, mem, adr, adr_type, val, mo); |
1527 } else { | 1529 } else { |
1528 st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt); | 1530 st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt, mo); |
1529 } | 1531 } |
1530 st = _gvn.transform(st); | 1532 st = _gvn.transform(st); |
1531 set_memory(st, adr_idx); | 1533 set_memory(st, adr_idx); |
1532 // Back-to-back stores can only remove intermediate store with DU info | 1534 // Back-to-back stores can only remove intermediate store with DU info |
1533 // so push on worklist for optimizer. | 1535 // so push on worklist for optimizer. |
1623 Node* adr, | 1625 Node* adr, |
1624 const TypePtr* adr_type, | 1626 const TypePtr* adr_type, |
1625 Node* val, | 1627 Node* val, |
1626 const TypeOopPtr* val_type, | 1628 const TypeOopPtr* val_type, |
1627 BasicType bt, | 1629 BasicType bt, |
1628 bool use_precise) { | 1630 bool use_precise, |
1631 MemNode::MemOrd mo) { | |
1629 // Transformation of a value which could be NULL pointer (CastPP #NULL) | 1632 // Transformation of a value which could be NULL pointer (CastPP #NULL) |
1630 // could be delayed during Parse (for example, in adjust_map_after_if()). | 1633 // could be delayed during Parse (for example, in adjust_map_after_if()). |
1631 // Execute transformation here to avoid barrier generation in such case. | 1634 // Execute transformation here to avoid barrier generation in such case. |
1632 if (_gvn.type(val) == TypePtr::NULL_PTR) | 1635 if (_gvn.type(val) == TypePtr::NULL_PTR) |
1633 val = _gvn.makecon(TypePtr::NULL_PTR); | 1636 val = _gvn.makecon(TypePtr::NULL_PTR); |
1643 pre_barrier(true /* do_load */, | 1646 pre_barrier(true /* do_load */, |
1644 control(), obj, adr, adr_idx, val, val_type, | 1647 control(), obj, adr, adr_idx, val, val_type, |
1645 NULL /* pre_val */, | 1648 NULL /* pre_val */, |
1646 bt); | 1649 bt); |
1647 | 1650 |
1648 Node* store = store_to_memory(control(), adr, val, bt, adr_idx); | 1651 Node* store = store_to_memory(control(), adr, val, bt, adr_idx, mo); |
1649 post_barrier(control(), store, obj, adr, adr_idx, val, bt, use_precise); | 1652 post_barrier(control(), store, obj, adr, adr_idx, val, bt, use_precise); |
1650 return store; | 1653 return store; |
1651 } | 1654 } |
1652 | 1655 |
1653 // Could be an array or object we don't know at compile time (unsafe ref.) | 1656 // Could be an array or object we don't know at compile time (unsafe ref.) |
1654 Node* GraphKit::store_oop_to_unknown(Node* ctl, | 1657 Node* GraphKit::store_oop_to_unknown(Node* ctl, |
1655 Node* obj, // containing obj | 1658 Node* obj, // containing obj |
1656 Node* adr, // actual adress to store val at | 1659 Node* adr, // actual adress to store val at |
1657 const TypePtr* adr_type, | 1660 const TypePtr* adr_type, |
1658 Node* val, | 1661 Node* val, |
1659 BasicType bt) { | 1662 BasicType bt, |
1663 MemNode::MemOrd mo) { | |
1660 Compile::AliasType* at = C->alias_type(adr_type); | 1664 Compile::AliasType* at = C->alias_type(adr_type); |
1661 const TypeOopPtr* val_type = NULL; | 1665 const TypeOopPtr* val_type = NULL; |
1662 if (adr_type->isa_instptr()) { | 1666 if (adr_type->isa_instptr()) { |
1663 if (at->field() != NULL) { | 1667 if (at->field() != NULL) { |
1664 // known field. This code is a copy of the do_put_xxx logic. | 1668 // known field. This code is a copy of the do_put_xxx logic. |
1673 val_type = adr_type->is_aryptr()->elem()->make_oopptr(); | 1677 val_type = adr_type->is_aryptr()->elem()->make_oopptr(); |
1674 } | 1678 } |
1675 if (val_type == NULL) { | 1679 if (val_type == NULL) { |
1676 val_type = TypeInstPtr::BOTTOM; | 1680 val_type = TypeInstPtr::BOTTOM; |
1677 } | 1681 } |
1678 return store_oop(ctl, obj, adr, adr_type, val, val_type, bt, true); | 1682 return store_oop(ctl, obj, adr, adr_type, val, val_type, bt, true, mo); |
1679 } | 1683 } |
1680 | 1684 |
1681 | 1685 |
1682 //-------------------------array_element_address------------------------- | 1686 //-------------------------array_element_address------------------------- |
1683 Node* GraphKit::array_element_address(Node* ary, Node* idx, BasicType elembt, | 1687 Node* GraphKit::array_element_address(Node* ary, Node* idx, BasicType elembt, |
1717 //-------------------------load_array_element------------------------- | 1721 //-------------------------load_array_element------------------------- |
1718 Node* GraphKit::load_array_element(Node* ctl, Node* ary, Node* idx, const TypeAryPtr* arytype) { | 1722 Node* GraphKit::load_array_element(Node* ctl, Node* ary, Node* idx, const TypeAryPtr* arytype) { |
1719 const Type* elemtype = arytype->elem(); | 1723 const Type* elemtype = arytype->elem(); |
1720 BasicType elembt = elemtype->array_element_basic_type(); | 1724 BasicType elembt = elemtype->array_element_basic_type(); |
1721 Node* adr = array_element_address(ary, idx, elembt, arytype->size()); | 1725 Node* adr = array_element_address(ary, idx, elembt, arytype->size()); |
1722 Node* ld = make_load(ctl, adr, elemtype, elembt, arytype); | 1726 Node* ld = make_load(ctl, adr, elemtype, elembt, arytype, MemNode::unordered); |
1723 return ld; | 1727 return ld; |
1724 } | 1728 } |
1725 | 1729 |
1726 //-------------------------set_arguments_for_java_call------------------------- | 1730 //-------------------------set_arguments_for_java_call------------------------- |
1727 // Arguments (pre-popped from the stack) are taken from the JVMS. | 1731 // Arguments (pre-popped from the stack) are taken from the JVMS. |
1952 } | 1956 } |
1953 | 1957 |
1954 void GraphKit::increment_counter(Node* counter_addr) { | 1958 void GraphKit::increment_counter(Node* counter_addr) { |
1955 int adr_type = Compile::AliasIdxRaw; | 1959 int adr_type = Compile::AliasIdxRaw; |
1956 Node* ctrl = control(); | 1960 Node* ctrl = control(); |
1957 Node* cnt = make_load(ctrl, counter_addr, TypeInt::INT, T_INT, adr_type); | 1961 Node* cnt = make_load(ctrl, counter_addr, TypeInt::INT, T_INT, adr_type, MemNode::unordered); |
1958 Node* incr = _gvn.transform(new (C) AddINode(cnt, _gvn.intcon(1))); | 1962 Node* incr = _gvn.transform(new (C) AddINode(cnt, _gvn.intcon(1))); |
1959 store_to_memory( ctrl, counter_addr, incr, T_INT, adr_type ); | 1963 store_to_memory(ctrl, counter_addr, incr, T_INT, adr_type, MemNode::unordered); |
1960 } | 1964 } |
1961 | 1965 |
1962 | 1966 |
1963 //------------------------------uncommon_trap---------------------------------- | 1967 //------------------------------uncommon_trap---------------------------------- |
1964 // Bail out to the interpreter in mid-method. Implemented by calling the | 1968 // Bail out to the interpreter in mid-method. Implemented by calling the |
2538 // if the subklass is the unique subtype of the superklass, the check | 2542 // if the subklass is the unique subtype of the superklass, the check |
2539 // will always succeed. We could leave a dependency behind to ensure this. | 2543 // will always succeed. We could leave a dependency behind to ensure this. |
2540 | 2544 |
2541 // First load the super-klass's check-offset | 2545 // First load the super-klass's check-offset |
2542 Node *p1 = basic_plus_adr( superklass, superklass, in_bytes(Klass::super_check_offset_offset()) ); | 2546 Node *p1 = basic_plus_adr( superklass, superklass, in_bytes(Klass::super_check_offset_offset()) ); |
2543 Node *chk_off = _gvn.transform( new (C) LoadINode( NULL, memory(p1), p1, _gvn.type(p1)->is_ptr() ) ); | 2547 Node *chk_off = _gvn.transform(new (C) LoadINode(NULL, memory(p1), p1, _gvn.type(p1)->is_ptr(), |
2548 TypeInt::INT, MemNode::unordered)); | |
2544 int cacheoff_con = in_bytes(Klass::secondary_super_cache_offset()); | 2549 int cacheoff_con = in_bytes(Klass::secondary_super_cache_offset()); |
2545 bool might_be_cache = (find_int_con(chk_off, cacheoff_con) == cacheoff_con); | 2550 bool might_be_cache = (find_int_con(chk_off, cacheoff_con) == cacheoff_con); |
2546 | 2551 |
2547 // Load from the sub-klass's super-class display list, or a 1-word cache of | 2552 // Load from the sub-klass's super-class display list, or a 1-word cache of |
2548 // the secondary superclass list, or a failing value with a sentinel offset | 2553 // the secondary superclass list, or a failing value with a sentinel offset |
3265 } | 3270 } |
3266 } | 3271 } |
3267 } | 3272 } |
3268 constant_value = Klass::_lh_neutral_value; // put in a known value | 3273 constant_value = Klass::_lh_neutral_value; // put in a known value |
3269 Node* lhp = basic_plus_adr(klass_node, klass_node, in_bytes(Klass::layout_helper_offset())); | 3274 Node* lhp = basic_plus_adr(klass_node, klass_node, in_bytes(Klass::layout_helper_offset())); |
3270 return make_load(NULL, lhp, TypeInt::INT, T_INT); | 3275 return make_load(NULL, lhp, TypeInt::INT, T_INT, MemNode::unordered); |
3271 } | 3276 } |
3272 | 3277 |
3273 // We just put in an allocate/initialize with a big raw-memory effect. | 3278 // We just put in an allocate/initialize with a big raw-memory effect. |
3274 // Hook selected additional alias categories on the initialization. | 3279 // Hook selected additional alias categories on the initialization. |
3275 static void hook_memory_on_init(GraphKit& kit, int alias_idx, | 3280 static void hook_memory_on_init(GraphKit& kit, int alias_idx, |
3800 __ if_then(card_val, BoolTest::ne, zero); | 3805 __ if_then(card_val, BoolTest::ne, zero); |
3801 } | 3806 } |
3802 | 3807 |
3803 // Smash zero into card | 3808 // Smash zero into card |
3804 if( !UseConcMarkSweepGC ) { | 3809 if( !UseConcMarkSweepGC ) { |
3805 __ store(__ ctrl(), card_adr, zero, bt, adr_type); | 3810 __ store(__ ctrl(), card_adr, zero, bt, adr_type, MemNode::release); |
3806 } else { | 3811 } else { |
3807 // Specialized path for CM store barrier | 3812 // Specialized path for CM store barrier |
3808 __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, bt, adr_type); | 3813 __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, bt, adr_type); |
3809 } | 3814 } |
3810 | 3815 |
3897 // decrement the index | 3902 // decrement the index |
3898 Node* next_index = _gvn.transform(new (C) SubXNode(index, __ ConX(sizeof(intptr_t)))); | 3903 Node* next_index = _gvn.transform(new (C) SubXNode(index, __ ConX(sizeof(intptr_t)))); |
3899 | 3904 |
3900 // Now get the buffer location we will log the previous value into and store it | 3905 // Now get the buffer location we will log the previous value into and store it |
3901 Node *log_addr = __ AddP(no_base, buffer, next_index); | 3906 Node *log_addr = __ AddP(no_base, buffer, next_index); |
3902 __ store(__ ctrl(), log_addr, pre_val, T_OBJECT, Compile::AliasIdxRaw); | 3907 __ store(__ ctrl(), log_addr, pre_val, T_OBJECT, Compile::AliasIdxRaw, MemNode::unordered); |
3903 // update the index | 3908 // update the index |
3904 __ store(__ ctrl(), index_adr, next_index, index_bt, Compile::AliasIdxRaw); | 3909 __ store(__ ctrl(), index_adr, next_index, index_bt, Compile::AliasIdxRaw, MemNode::unordered); |
3905 | 3910 |
3906 } __ else_(); { | 3911 } __ else_(); { |
3907 | 3912 |
3908 // logging buffer is full, call the runtime | 3913 // logging buffer is full, call the runtime |
3909 const TypeFunc *tf = OptoRuntime::g1_wb_pre_Type(); | 3914 const TypeFunc *tf = OptoRuntime::g1_wb_pre_Type(); |
3939 __ if_then(index, BoolTest::ne, zeroX); { | 3944 __ if_then(index, BoolTest::ne, zeroX); { |
3940 | 3945 |
3941 Node* next_index = _gvn.transform(new (C) SubXNode(index, __ ConX(sizeof(intptr_t)))); | 3946 Node* next_index = _gvn.transform(new (C) SubXNode(index, __ ConX(sizeof(intptr_t)))); |
3942 Node* log_addr = __ AddP(no_base, buffer, next_index); | 3947 Node* log_addr = __ AddP(no_base, buffer, next_index); |
3943 | 3948 |
3944 __ store(__ ctrl(), log_addr, card_adr, T_ADDRESS, Compile::AliasIdxRaw); | 3949 // Order, see storeCM. |
3945 __ store(__ ctrl(), index_adr, next_index, TypeX_X->basic_type(), Compile::AliasIdxRaw); | 3950 __ store(__ ctrl(), log_addr, card_adr, T_ADDRESS, Compile::AliasIdxRaw, MemNode::unordered); |
3951 __ store(__ ctrl(), index_adr, next_index, TypeX_X->basic_type(), Compile::AliasIdxRaw, MemNode::unordered); | |
3946 | 3952 |
3947 } __ else_(); { | 3953 } __ else_(); { |
3948 __ make_leaf_call(tf, CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), "g1_wb_post", card_adr, __ thread()); | 3954 __ make_leaf_call(tf, CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), "g1_wb_post", card_adr, __ thread()); |
3949 } __ end_if(); | 3955 } __ end_if(); |
3950 | 3956 |
4070 false, NULL, 0); | 4076 false, NULL, 0); |
4071 const TypePtr* offset_field_type = string_type->add_offset(offset_offset); | 4077 const TypePtr* offset_field_type = string_type->add_offset(offset_offset); |
4072 int offset_field_idx = C->get_alias_index(offset_field_type); | 4078 int offset_field_idx = C->get_alias_index(offset_field_type); |
4073 return make_load(ctrl, | 4079 return make_load(ctrl, |
4074 basic_plus_adr(str, str, offset_offset), | 4080 basic_plus_adr(str, str, offset_offset), |
4075 TypeInt::INT, T_INT, offset_field_idx); | 4081 TypeInt::INT, T_INT, offset_field_idx, MemNode::unordered); |
4076 } else { | 4082 } else { |
4077 return intcon(0); | 4083 return intcon(0); |
4078 } | 4084 } |
4079 } | 4085 } |
4080 | 4086 |
4085 false, NULL, 0); | 4091 false, NULL, 0); |
4086 const TypePtr* count_field_type = string_type->add_offset(count_offset); | 4092 const TypePtr* count_field_type = string_type->add_offset(count_offset); |
4087 int count_field_idx = C->get_alias_index(count_field_type); | 4093 int count_field_idx = C->get_alias_index(count_field_type); |
4088 return make_load(ctrl, | 4094 return make_load(ctrl, |
4089 basic_plus_adr(str, str, count_offset), | 4095 basic_plus_adr(str, str, count_offset), |
4090 TypeInt::INT, T_INT, count_field_idx); | 4096 TypeInt::INT, T_INT, count_field_idx, MemNode::unordered); |
4091 } else { | 4097 } else { |
4092 return load_array_length(load_String_value(ctrl, str)); | 4098 return load_array_length(load_String_value(ctrl, str)); |
4093 } | 4099 } |
4094 } | 4100 } |
4095 | 4101 |
4101 const TypeAryPtr* value_type = TypeAryPtr::make(TypePtr::NotNull, | 4107 const TypeAryPtr* value_type = TypeAryPtr::make(TypePtr::NotNull, |
4102 TypeAry::make(TypeInt::CHAR,TypeInt::POS), | 4108 TypeAry::make(TypeInt::CHAR,TypeInt::POS), |
4103 ciTypeArrayKlass::make(T_CHAR), true, 0); | 4109 ciTypeArrayKlass::make(T_CHAR), true, 0); |
4104 int value_field_idx = C->get_alias_index(value_field_type); | 4110 int value_field_idx = C->get_alias_index(value_field_type); |
4105 Node* load = make_load(ctrl, basic_plus_adr(str, str, value_offset), | 4111 Node* load = make_load(ctrl, basic_plus_adr(str, str, value_offset), |
4106 value_type, T_OBJECT, value_field_idx); | 4112 value_type, T_OBJECT, value_field_idx, MemNode::unordered); |
4107 // String.value field is known to be @Stable. | 4113 // String.value field is known to be @Stable. |
4108 if (UseImplicitStableValues) { | 4114 if (UseImplicitStableValues) { |
4109 load = cast_array_to_stable(load, value_type); | 4115 load = cast_array_to_stable(load, value_type); |
4110 } | 4116 } |
4111 return load; | 4117 return load; |
4116 const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(), | 4122 const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(), |
4117 false, NULL, 0); | 4123 false, NULL, 0); |
4118 const TypePtr* offset_field_type = string_type->add_offset(offset_offset); | 4124 const TypePtr* offset_field_type = string_type->add_offset(offset_offset); |
4119 int offset_field_idx = C->get_alias_index(offset_field_type); | 4125 int offset_field_idx = C->get_alias_index(offset_field_type); |
4120 store_to_memory(ctrl, basic_plus_adr(str, offset_offset), | 4126 store_to_memory(ctrl, basic_plus_adr(str, offset_offset), |
4121 value, T_INT, offset_field_idx); | 4127 value, T_INT, offset_field_idx, MemNode::unordered); |
4122 } | 4128 } |
4123 | 4129 |
4124 void GraphKit::store_String_value(Node* ctrl, Node* str, Node* value) { | 4130 void GraphKit::store_String_value(Node* ctrl, Node* str, Node* value) { |
4125 int value_offset = java_lang_String::value_offset_in_bytes(); | 4131 int value_offset = java_lang_String::value_offset_in_bytes(); |
4126 const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(), | 4132 const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(), |
4127 false, NULL, 0); | 4133 false, NULL, 0); |
4128 const TypePtr* value_field_type = string_type->add_offset(value_offset); | 4134 const TypePtr* value_field_type = string_type->add_offset(value_offset); |
4129 | 4135 |
4130 store_oop_to_object(ctrl, str, basic_plus_adr(str, value_offset), value_field_type, | 4136 store_oop_to_object(ctrl, str, basic_plus_adr(str, value_offset), value_field_type, |
4131 value, TypeAryPtr::CHARS, T_OBJECT); | 4137 value, TypeAryPtr::CHARS, T_OBJECT, MemNode::unordered); |
4132 } | 4138 } |
4133 | 4139 |
4134 void GraphKit::store_String_length(Node* ctrl, Node* str, Node* value) { | 4140 void GraphKit::store_String_length(Node* ctrl, Node* str, Node* value) { |
4135 int count_offset = java_lang_String::count_offset_in_bytes(); | 4141 int count_offset = java_lang_String::count_offset_in_bytes(); |
4136 const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(), | 4142 const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(), |
4137 false, NULL, 0); | 4143 false, NULL, 0); |
4138 const TypePtr* count_field_type = string_type->add_offset(count_offset); | 4144 const TypePtr* count_field_type = string_type->add_offset(count_offset); |
4139 int count_field_idx = C->get_alias_index(count_field_type); | 4145 int count_field_idx = C->get_alias_index(count_field_type); |
4140 store_to_memory(ctrl, basic_plus_adr(str, count_offset), | 4146 store_to_memory(ctrl, basic_plus_adr(str, count_offset), |
4141 value, T_INT, count_field_idx); | 4147 value, T_INT, count_field_idx, MemNode::unordered); |
4142 } | 4148 } |
4143 | 4149 |
4144 Node* GraphKit::cast_array_to_stable(Node* ary, const TypeAryPtr* ary_type) { | 4150 Node* GraphKit::cast_array_to_stable(Node* ary, const TypeAryPtr* ary_type) { |
4145 // Reify the property as a CastPP node in Ideal graph to comply with monotonicity | 4151 // Reify the property as a CastPP node in Ideal graph to comply with monotonicity |
4146 // assumption of CCP analysis. | 4152 // assumption of CCP analysis. |