Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/graphKit.cpp @ 14456:abec000618bf
Merge
author | kvn |
---|---|
date | Tue, 28 Jan 2014 12:25:34 -0800 |
parents | de6a9e811145 2113136690bc |
children | 45467c53f178 |
comparison
equal
deleted
inserted
replaced
14269:2a8891e0a082 | 14456:abec000618bf |
---|---|
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 } |
1481 // | 1482 // |
1482 | 1483 |
1483 // factory methods in "int adr_idx" | 1484 // factory methods in "int adr_idx" |
1484 Node* GraphKit::make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, | 1485 Node* GraphKit::make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, |
1485 int adr_idx, | 1486 int adr_idx, |
1486 bool require_atomic_access) { | 1487 MemNode::MemOrd mo, bool require_atomic_access) { |
1487 assert(adr_idx != Compile::AliasIdxTop, "use other make_load factory" ); | 1488 assert(adr_idx != Compile::AliasIdxTop, "use other make_load factory" ); |
1488 const TypePtr* adr_type = NULL; // debug-mode-only argument | 1489 const TypePtr* adr_type = NULL; // debug-mode-only argument |
1489 debug_only(adr_type = C->get_adr_type(adr_idx)); | 1490 debug_only(adr_type = C->get_adr_type(adr_idx)); |
1490 Node* mem = memory(adr_idx); | 1491 Node* mem = memory(adr_idx); |
1491 Node* ld; | 1492 Node* ld; |
1492 if (require_atomic_access && bt == T_LONG) { | 1493 if (require_atomic_access && bt == T_LONG) { |
1493 ld = LoadLNode::make_atomic(C, ctl, mem, adr, adr_type, t); | 1494 ld = LoadLNode::make_atomic(C, ctl, mem, adr, adr_type, t, mo); |
1494 } else { | 1495 } else { |
1495 ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt); | 1496 ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo); |
1496 } | 1497 } |
1497 ld = _gvn.transform(ld); | 1498 ld = _gvn.transform(ld); |
1498 if ((bt == T_OBJECT) && C->do_escape_analysis() || C->eliminate_boxing()) { | 1499 if ((bt == T_OBJECT) && C->do_escape_analysis() || C->eliminate_boxing()) { |
1499 // Improve graph before escape analysis and boxing elimination. | 1500 // Improve graph before escape analysis and boxing elimination. |
1500 record_for_igvn(ld); | 1501 record_for_igvn(ld); |
1502 return ld; | 1503 return ld; |
1503 } | 1504 } |
1504 | 1505 |
1505 Node* GraphKit::store_to_memory(Node* ctl, Node* adr, Node *val, BasicType bt, | 1506 Node* GraphKit::store_to_memory(Node* ctl, Node* adr, Node *val, BasicType bt, |
1506 int adr_idx, | 1507 int adr_idx, |
1508 MemNode::MemOrd mo, | |
1507 bool require_atomic_access) { | 1509 bool require_atomic_access) { |
1508 assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" ); | 1510 assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" ); |
1509 const TypePtr* adr_type = NULL; | 1511 const TypePtr* adr_type = NULL; |
1510 debug_only(adr_type = C->get_adr_type(adr_idx)); | 1512 debug_only(adr_type = C->get_adr_type(adr_idx)); |
1511 Node *mem = memory(adr_idx); | 1513 Node *mem = memory(adr_idx); |
1512 Node* st; | 1514 Node* st; |
1513 if (require_atomic_access && bt == T_LONG) { | 1515 if (require_atomic_access && bt == T_LONG) { |
1514 st = StoreLNode::make_atomic(C, ctl, mem, adr, adr_type, val); | 1516 st = StoreLNode::make_atomic(C, ctl, mem, adr, adr_type, val, mo); |
1515 } else { | 1517 } else { |
1516 st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt); | 1518 st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt, mo); |
1517 } | 1519 } |
1518 st = _gvn.transform(st); | 1520 st = _gvn.transform(st); |
1519 set_memory(st, adr_idx); | 1521 set_memory(st, adr_idx); |
1520 // Back-to-back stores can only remove intermediate store with DU info | 1522 // Back-to-back stores can only remove intermediate store with DU info |
1521 // so push on worklist for optimizer. | 1523 // so push on worklist for optimizer. |
1611 Node* adr, | 1613 Node* adr, |
1612 const TypePtr* adr_type, | 1614 const TypePtr* adr_type, |
1613 Node* val, | 1615 Node* val, |
1614 const TypeOopPtr* val_type, | 1616 const TypeOopPtr* val_type, |
1615 BasicType bt, | 1617 BasicType bt, |
1616 bool use_precise) { | 1618 bool use_precise, |
1619 MemNode::MemOrd mo) { | |
1617 // Transformation of a value which could be NULL pointer (CastPP #NULL) | 1620 // Transformation of a value which could be NULL pointer (CastPP #NULL) |
1618 // could be delayed during Parse (for example, in adjust_map_after_if()). | 1621 // could be delayed during Parse (for example, in adjust_map_after_if()). |
1619 // Execute transformation here to avoid barrier generation in such case. | 1622 // Execute transformation here to avoid barrier generation in such case. |
1620 if (_gvn.type(val) == TypePtr::NULL_PTR) | 1623 if (_gvn.type(val) == TypePtr::NULL_PTR) |
1621 val = _gvn.makecon(TypePtr::NULL_PTR); | 1624 val = _gvn.makecon(TypePtr::NULL_PTR); |
1631 pre_barrier(true /* do_load */, | 1634 pre_barrier(true /* do_load */, |
1632 control(), obj, adr, adr_idx, val, val_type, | 1635 control(), obj, adr, adr_idx, val, val_type, |
1633 NULL /* pre_val */, | 1636 NULL /* pre_val */, |
1634 bt); | 1637 bt); |
1635 | 1638 |
1636 Node* store = store_to_memory(control(), adr, val, bt, adr_idx); | 1639 Node* store = store_to_memory(control(), adr, val, bt, adr_idx, mo); |
1637 post_barrier(control(), store, obj, adr, adr_idx, val, bt, use_precise); | 1640 post_barrier(control(), store, obj, adr, adr_idx, val, bt, use_precise); |
1638 return store; | 1641 return store; |
1639 } | 1642 } |
1640 | 1643 |
1641 // Could be an array or object we don't know at compile time (unsafe ref.) | 1644 // Could be an array or object we don't know at compile time (unsafe ref.) |
1642 Node* GraphKit::store_oop_to_unknown(Node* ctl, | 1645 Node* GraphKit::store_oop_to_unknown(Node* ctl, |
1643 Node* obj, // containing obj | 1646 Node* obj, // containing obj |
1644 Node* adr, // actual adress to store val at | 1647 Node* adr, // actual adress to store val at |
1645 const TypePtr* adr_type, | 1648 const TypePtr* adr_type, |
1646 Node* val, | 1649 Node* val, |
1647 BasicType bt) { | 1650 BasicType bt, |
1651 MemNode::MemOrd mo) { | |
1648 Compile::AliasType* at = C->alias_type(adr_type); | 1652 Compile::AliasType* at = C->alias_type(adr_type); |
1649 const TypeOopPtr* val_type = NULL; | 1653 const TypeOopPtr* val_type = NULL; |
1650 if (adr_type->isa_instptr()) { | 1654 if (adr_type->isa_instptr()) { |
1651 if (at->field() != NULL) { | 1655 if (at->field() != NULL) { |
1652 // known field. This code is a copy of the do_put_xxx logic. | 1656 // known field. This code is a copy of the do_put_xxx logic. |
1661 val_type = adr_type->is_aryptr()->elem()->make_oopptr(); | 1665 val_type = adr_type->is_aryptr()->elem()->make_oopptr(); |
1662 } | 1666 } |
1663 if (val_type == NULL) { | 1667 if (val_type == NULL) { |
1664 val_type = TypeInstPtr::BOTTOM; | 1668 val_type = TypeInstPtr::BOTTOM; |
1665 } | 1669 } |
1666 return store_oop(ctl, obj, adr, adr_type, val, val_type, bt, true); | 1670 return store_oop(ctl, obj, adr, adr_type, val, val_type, bt, true, mo); |
1667 } | 1671 } |
1668 | 1672 |
1669 | 1673 |
1670 //-------------------------array_element_address------------------------- | 1674 //-------------------------array_element_address------------------------- |
1671 Node* GraphKit::array_element_address(Node* ary, Node* idx, BasicType elembt, | 1675 Node* GraphKit::array_element_address(Node* ary, Node* idx, BasicType elembt, |
1705 //-------------------------load_array_element------------------------- | 1709 //-------------------------load_array_element------------------------- |
1706 Node* GraphKit::load_array_element(Node* ctl, Node* ary, Node* idx, const TypeAryPtr* arytype) { | 1710 Node* GraphKit::load_array_element(Node* ctl, Node* ary, Node* idx, const TypeAryPtr* arytype) { |
1707 const Type* elemtype = arytype->elem(); | 1711 const Type* elemtype = arytype->elem(); |
1708 BasicType elembt = elemtype->array_element_basic_type(); | 1712 BasicType elembt = elemtype->array_element_basic_type(); |
1709 Node* adr = array_element_address(ary, idx, elembt, arytype->size()); | 1713 Node* adr = array_element_address(ary, idx, elembt, arytype->size()); |
1710 Node* ld = make_load(ctl, adr, elemtype, elembt, arytype); | 1714 Node* ld = make_load(ctl, adr, elemtype, elembt, arytype, MemNode::unordered); |
1711 return ld; | 1715 return ld; |
1712 } | 1716 } |
1713 | 1717 |
1714 //-------------------------set_arguments_for_java_call------------------------- | 1718 //-------------------------set_arguments_for_java_call------------------------- |
1715 // Arguments (pre-popped from the stack) are taken from the JVMS. | 1719 // Arguments (pre-popped from the stack) are taken from the JVMS. |
1940 } | 1944 } |
1941 | 1945 |
1942 void GraphKit::increment_counter(Node* counter_addr) { | 1946 void GraphKit::increment_counter(Node* counter_addr) { |
1943 int adr_type = Compile::AliasIdxRaw; | 1947 int adr_type = Compile::AliasIdxRaw; |
1944 Node* ctrl = control(); | 1948 Node* ctrl = control(); |
1945 Node* cnt = make_load(ctrl, counter_addr, TypeInt::INT, T_INT, adr_type); | 1949 Node* cnt = make_load(ctrl, counter_addr, TypeInt::INT, T_INT, adr_type, MemNode::unordered); |
1946 Node* incr = _gvn.transform(new (C) AddINode(cnt, _gvn.intcon(1))); | 1950 Node* incr = _gvn.transform(new (C) AddINode(cnt, _gvn.intcon(1))); |
1947 store_to_memory( ctrl, counter_addr, incr, T_INT, adr_type ); | 1951 store_to_memory(ctrl, counter_addr, incr, T_INT, adr_type, MemNode::unordered); |
1948 } | 1952 } |
1949 | 1953 |
1950 | 1954 |
1951 //------------------------------uncommon_trap---------------------------------- | 1955 //------------------------------uncommon_trap---------------------------------- |
1952 // Bail out to the interpreter in mid-method. Implemented by calling the | 1956 // Bail out to the interpreter in mid-method. Implemented by calling the |
2523 // if the subklass is the unique subtype of the superklass, the check | 2527 // if the subklass is the unique subtype of the superklass, the check |
2524 // will always succeed. We could leave a dependency behind to ensure this. | 2528 // will always succeed. We could leave a dependency behind to ensure this. |
2525 | 2529 |
2526 // First load the super-klass's check-offset | 2530 // First load the super-klass's check-offset |
2527 Node *p1 = basic_plus_adr( superklass, superklass, in_bytes(Klass::super_check_offset_offset()) ); | 2531 Node *p1 = basic_plus_adr( superklass, superklass, in_bytes(Klass::super_check_offset_offset()) ); |
2528 Node *chk_off = _gvn.transform( new (C) LoadINode( NULL, memory(p1), p1, _gvn.type(p1)->is_ptr() ) ); | 2532 Node *chk_off = _gvn.transform(new (C) LoadINode(NULL, memory(p1), p1, _gvn.type(p1)->is_ptr(), |
2533 TypeInt::INT, MemNode::unordered)); | |
2529 int cacheoff_con = in_bytes(Klass::secondary_super_cache_offset()); | 2534 int cacheoff_con = in_bytes(Klass::secondary_super_cache_offset()); |
2530 bool might_be_cache = (find_int_con(chk_off, cacheoff_con) == cacheoff_con); | 2535 bool might_be_cache = (find_int_con(chk_off, cacheoff_con) == cacheoff_con); |
2531 | 2536 |
2532 // Load from the sub-klass's super-class display list, or a 1-word cache of | 2537 // Load from the sub-klass's super-class display list, or a 1-word cache of |
2533 // the secondary superclass list, or a failing value with a sentinel offset | 2538 // the secondary superclass list, or a failing value with a sentinel offset |
3236 } | 3241 } |
3237 } | 3242 } |
3238 } | 3243 } |
3239 constant_value = Klass::_lh_neutral_value; // put in a known value | 3244 constant_value = Klass::_lh_neutral_value; // put in a known value |
3240 Node* lhp = basic_plus_adr(klass_node, klass_node, in_bytes(Klass::layout_helper_offset())); | 3245 Node* lhp = basic_plus_adr(klass_node, klass_node, in_bytes(Klass::layout_helper_offset())); |
3241 return make_load(NULL, lhp, TypeInt::INT, T_INT); | 3246 return make_load(NULL, lhp, TypeInt::INT, T_INT, MemNode::unordered); |
3242 } | 3247 } |
3243 | 3248 |
3244 // We just put in an allocate/initialize with a big raw-memory effect. | 3249 // We just put in an allocate/initialize with a big raw-memory effect. |
3245 // Hook selected additional alias categories on the initialization. | 3250 // Hook selected additional alias categories on the initialization. |
3246 static void hook_memory_on_init(GraphKit& kit, int alias_idx, | 3251 static void hook_memory_on_init(GraphKit& kit, int alias_idx, |
3771 __ if_then(card_val, BoolTest::ne, zero); | 3776 __ if_then(card_val, BoolTest::ne, zero); |
3772 } | 3777 } |
3773 | 3778 |
3774 // Smash zero into card | 3779 // Smash zero into card |
3775 if( !UseConcMarkSweepGC ) { | 3780 if( !UseConcMarkSweepGC ) { |
3776 __ store(__ ctrl(), card_adr, zero, bt, adr_type); | 3781 __ store(__ ctrl(), card_adr, zero, bt, adr_type, MemNode::release); |
3777 } else { | 3782 } else { |
3778 // Specialized path for CM store barrier | 3783 // Specialized path for CM store barrier |
3779 __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, bt, adr_type); | 3784 __ storeCM(__ ctrl(), card_adr, zero, oop_store, adr_idx, bt, adr_type); |
3780 } | 3785 } |
3781 | 3786 |
3868 // decrement the index | 3873 // decrement the index |
3869 Node* next_index = _gvn.transform(new (C) SubXNode(index, __ ConX(sizeof(intptr_t)))); | 3874 Node* next_index = _gvn.transform(new (C) SubXNode(index, __ ConX(sizeof(intptr_t)))); |
3870 | 3875 |
3871 // Now get the buffer location we will log the previous value into and store it | 3876 // Now get the buffer location we will log the previous value into and store it |
3872 Node *log_addr = __ AddP(no_base, buffer, next_index); | 3877 Node *log_addr = __ AddP(no_base, buffer, next_index); |
3873 __ store(__ ctrl(), log_addr, pre_val, T_OBJECT, Compile::AliasIdxRaw); | 3878 __ store(__ ctrl(), log_addr, pre_val, T_OBJECT, Compile::AliasIdxRaw, MemNode::unordered); |
3874 // update the index | 3879 // update the index |
3875 __ store(__ ctrl(), index_adr, next_index, index_bt, Compile::AliasIdxRaw); | 3880 __ store(__ ctrl(), index_adr, next_index, index_bt, Compile::AliasIdxRaw, MemNode::unordered); |
3876 | 3881 |
3877 } __ else_(); { | 3882 } __ else_(); { |
3878 | 3883 |
3879 // logging buffer is full, call the runtime | 3884 // logging buffer is full, call the runtime |
3880 const TypeFunc *tf = OptoRuntime::g1_wb_pre_Type(); | 3885 const TypeFunc *tf = OptoRuntime::g1_wb_pre_Type(); |
3910 __ if_then(index, BoolTest::ne, zeroX); { | 3915 __ if_then(index, BoolTest::ne, zeroX); { |
3911 | 3916 |
3912 Node* next_index = _gvn.transform(new (C) SubXNode(index, __ ConX(sizeof(intptr_t)))); | 3917 Node* next_index = _gvn.transform(new (C) SubXNode(index, __ ConX(sizeof(intptr_t)))); |
3913 Node* log_addr = __ AddP(no_base, buffer, next_index); | 3918 Node* log_addr = __ AddP(no_base, buffer, next_index); |
3914 | 3919 |
3915 __ store(__ ctrl(), log_addr, card_adr, T_ADDRESS, Compile::AliasIdxRaw); | 3920 // Order, see storeCM. |
3916 __ store(__ ctrl(), index_adr, next_index, TypeX_X->basic_type(), Compile::AliasIdxRaw); | 3921 __ store(__ ctrl(), log_addr, card_adr, T_ADDRESS, Compile::AliasIdxRaw, MemNode::unordered); |
3922 __ store(__ ctrl(), index_adr, next_index, TypeX_X->basic_type(), Compile::AliasIdxRaw, MemNode::unordered); | |
3917 | 3923 |
3918 } __ else_(); { | 3924 } __ else_(); { |
3919 __ make_leaf_call(tf, CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), "g1_wb_post", card_adr, __ thread()); | 3925 __ make_leaf_call(tf, CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), "g1_wb_post", card_adr, __ thread()); |
3920 } __ end_if(); | 3926 } __ end_if(); |
3921 | 3927 |
4041 false, NULL, 0); | 4047 false, NULL, 0); |
4042 const TypePtr* offset_field_type = string_type->add_offset(offset_offset); | 4048 const TypePtr* offset_field_type = string_type->add_offset(offset_offset); |
4043 int offset_field_idx = C->get_alias_index(offset_field_type); | 4049 int offset_field_idx = C->get_alias_index(offset_field_type); |
4044 return make_load(ctrl, | 4050 return make_load(ctrl, |
4045 basic_plus_adr(str, str, offset_offset), | 4051 basic_plus_adr(str, str, offset_offset), |
4046 TypeInt::INT, T_INT, offset_field_idx); | 4052 TypeInt::INT, T_INT, offset_field_idx, MemNode::unordered); |
4047 } else { | 4053 } else { |
4048 return intcon(0); | 4054 return intcon(0); |
4049 } | 4055 } |
4050 } | 4056 } |
4051 | 4057 |
4056 false, NULL, 0); | 4062 false, NULL, 0); |
4057 const TypePtr* count_field_type = string_type->add_offset(count_offset); | 4063 const TypePtr* count_field_type = string_type->add_offset(count_offset); |
4058 int count_field_idx = C->get_alias_index(count_field_type); | 4064 int count_field_idx = C->get_alias_index(count_field_type); |
4059 return make_load(ctrl, | 4065 return make_load(ctrl, |
4060 basic_plus_adr(str, str, count_offset), | 4066 basic_plus_adr(str, str, count_offset), |
4061 TypeInt::INT, T_INT, count_field_idx); | 4067 TypeInt::INT, T_INT, count_field_idx, MemNode::unordered); |
4062 } else { | 4068 } else { |
4063 return load_array_length(load_String_value(ctrl, str)); | 4069 return load_array_length(load_String_value(ctrl, str)); |
4064 } | 4070 } |
4065 } | 4071 } |
4066 | 4072 |
4072 const TypeAryPtr* value_type = TypeAryPtr::make(TypePtr::NotNull, | 4078 const TypeAryPtr* value_type = TypeAryPtr::make(TypePtr::NotNull, |
4073 TypeAry::make(TypeInt::CHAR,TypeInt::POS), | 4079 TypeAry::make(TypeInt::CHAR,TypeInt::POS), |
4074 ciTypeArrayKlass::make(T_CHAR), true, 0); | 4080 ciTypeArrayKlass::make(T_CHAR), true, 0); |
4075 int value_field_idx = C->get_alias_index(value_field_type); | 4081 int value_field_idx = C->get_alias_index(value_field_type); |
4076 Node* load = make_load(ctrl, basic_plus_adr(str, str, value_offset), | 4082 Node* load = make_load(ctrl, basic_plus_adr(str, str, value_offset), |
4077 value_type, T_OBJECT, value_field_idx); | 4083 value_type, T_OBJECT, value_field_idx, MemNode::unordered); |
4078 // String.value field is known to be @Stable. | 4084 // String.value field is known to be @Stable. |
4079 if (UseImplicitStableValues) { | 4085 if (UseImplicitStableValues) { |
4080 load = cast_array_to_stable(load, value_type); | 4086 load = cast_array_to_stable(load, value_type); |
4081 } | 4087 } |
4082 return load; | 4088 return load; |
4087 const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(), | 4093 const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(), |
4088 false, NULL, 0); | 4094 false, NULL, 0); |
4089 const TypePtr* offset_field_type = string_type->add_offset(offset_offset); | 4095 const TypePtr* offset_field_type = string_type->add_offset(offset_offset); |
4090 int offset_field_idx = C->get_alias_index(offset_field_type); | 4096 int offset_field_idx = C->get_alias_index(offset_field_type); |
4091 store_to_memory(ctrl, basic_plus_adr(str, offset_offset), | 4097 store_to_memory(ctrl, basic_plus_adr(str, offset_offset), |
4092 value, T_INT, offset_field_idx); | 4098 value, T_INT, offset_field_idx, MemNode::unordered); |
4093 } | 4099 } |
4094 | 4100 |
4095 void GraphKit::store_String_value(Node* ctrl, Node* str, Node* value) { | 4101 void GraphKit::store_String_value(Node* ctrl, Node* str, Node* value) { |
4096 int value_offset = java_lang_String::value_offset_in_bytes(); | 4102 int value_offset = java_lang_String::value_offset_in_bytes(); |
4097 const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(), | 4103 const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(), |
4098 false, NULL, 0); | 4104 false, NULL, 0); |
4099 const TypePtr* value_field_type = string_type->add_offset(value_offset); | 4105 const TypePtr* value_field_type = string_type->add_offset(value_offset); |
4100 | 4106 |
4101 store_oop_to_object(ctrl, str, basic_plus_adr(str, value_offset), value_field_type, | 4107 store_oop_to_object(ctrl, str, basic_plus_adr(str, value_offset), value_field_type, |
4102 value, TypeAryPtr::CHARS, T_OBJECT); | 4108 value, TypeAryPtr::CHARS, T_OBJECT, MemNode::unordered); |
4103 } | 4109 } |
4104 | 4110 |
4105 void GraphKit::store_String_length(Node* ctrl, Node* str, Node* value) { | 4111 void GraphKit::store_String_length(Node* ctrl, Node* str, Node* value) { |
4106 int count_offset = java_lang_String::count_offset_in_bytes(); | 4112 int count_offset = java_lang_String::count_offset_in_bytes(); |
4107 const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(), | 4113 const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::NotNull, C->env()->String_klass(), |
4108 false, NULL, 0); | 4114 false, NULL, 0); |
4109 const TypePtr* count_field_type = string_type->add_offset(count_offset); | 4115 const TypePtr* count_field_type = string_type->add_offset(count_offset); |
4110 int count_field_idx = C->get_alias_index(count_field_type); | 4116 int count_field_idx = C->get_alias_index(count_field_type); |
4111 store_to_memory(ctrl, basic_plus_adr(str, count_offset), | 4117 store_to_memory(ctrl, basic_plus_adr(str, count_offset), |
4112 value, T_INT, count_field_idx); | 4118 value, T_INT, count_field_idx, MemNode::unordered); |
4113 } | 4119 } |
4114 | 4120 |
4115 Node* GraphKit::cast_array_to_stable(Node* ary, const TypeAryPtr* ary_type) { | 4121 Node* GraphKit::cast_array_to_stable(Node* ary, const TypeAryPtr* ary_type) { |
4116 // Reify the property as a CastPP node in Ideal graph to comply with monotonicity | 4122 // Reify the property as a CastPP node in Ideal graph to comply with monotonicity |
4117 // assumption of CCP analysis. | 4123 // assumption of CCP analysis. |