Mercurial > hg > truffle
comparison src/share/vm/opto/graphKit.cpp @ 4970:33df1aeaebbf
Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 27 Feb 2012 13:10:13 +0100 |
parents | b9bc6cae88f2 |
children | 8f972594effc |
comparison
equal
deleted
inserted
replaced
4703:2cfb7fb2dce7 | 4970:33df1aeaebbf |
---|---|
1520 const TypePtr* adr_type, | 1520 const TypePtr* adr_type, |
1521 Node* val, | 1521 Node* val, |
1522 const TypeOopPtr* val_type, | 1522 const TypeOopPtr* val_type, |
1523 BasicType bt, | 1523 BasicType bt, |
1524 bool use_precise) { | 1524 bool use_precise) { |
1525 // Transformation of a value which could be NULL pointer (CastPP #NULL) | |
1526 // could be delayed during Parse (for example, in adjust_map_after_if()). | |
1527 // Execute transformation here to avoid barrier generation in such case. | |
1528 if (_gvn.type(val) == TypePtr::NULL_PTR) | |
1529 val = _gvn.makecon(TypePtr::NULL_PTR); | |
1525 | 1530 |
1526 set_control(ctl); | 1531 set_control(ctl); |
1527 if (stopped()) return top(); // Dead path ? | 1532 if (stopped()) return top(); // Dead path ? |
1528 | 1533 |
1529 assert(bt == T_OBJECT, "sanity"); | 1534 assert(bt == T_OBJECT, "sanity"); |
2302 // %%% Possible further optimization: Even if the superklass is not exact, | 2307 // %%% Possible further optimization: Even if the superklass is not exact, |
2303 // if the subklass is the unique subtype of the superklass, the check | 2308 // if the subklass is the unique subtype of the superklass, the check |
2304 // will always succeed. We could leave a dependency behind to ensure this. | 2309 // will always succeed. We could leave a dependency behind to ensure this. |
2305 | 2310 |
2306 // First load the super-klass's check-offset | 2311 // First load the super-klass's check-offset |
2307 Node *p1 = basic_plus_adr( superklass, superklass, sizeof(oopDesc) + Klass::super_check_offset_offset_in_bytes() ); | 2312 Node *p1 = basic_plus_adr( superklass, superklass, in_bytes(Klass::super_check_offset_offset()) ); |
2308 Node *chk_off = _gvn.transform( new (C, 3) LoadINode( NULL, memory(p1), p1, _gvn.type(p1)->is_ptr() ) ); | 2313 Node *chk_off = _gvn.transform( new (C, 3) LoadINode( NULL, memory(p1), p1, _gvn.type(p1)->is_ptr() ) ); |
2309 int cacheoff_con = sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes(); | 2314 int cacheoff_con = in_bytes(Klass::secondary_super_cache_offset()); |
2310 bool might_be_cache = (find_int_con(chk_off, cacheoff_con) == cacheoff_con); | 2315 bool might_be_cache = (find_int_con(chk_off, cacheoff_con) == cacheoff_con); |
2311 | 2316 |
2312 // Load from the sub-klass's super-class display list, or a 1-word cache of | 2317 // Load from the sub-klass's super-class display list, or a 1-word cache of |
2313 // the secondary superclass list, or a failing value with a sentinel offset | 2318 // the secondary superclass list, or a failing value with a sentinel offset |
2314 // if the super-klass is an interface or exceptionally deep in the Java | 2319 // if the super-klass is an interface or exceptionally deep in the Java |
2932 return (Node*) NULL; | 2937 return (Node*) NULL; |
2933 } | 2938 } |
2934 } | 2939 } |
2935 } | 2940 } |
2936 constant_value = Klass::_lh_neutral_value; // put in a known value | 2941 constant_value = Klass::_lh_neutral_value; // put in a known value |
2937 Node* lhp = basic_plus_adr(klass_node, klass_node, Klass::layout_helper_offset_in_bytes() + sizeof(oopDesc)); | 2942 Node* lhp = basic_plus_adr(klass_node, klass_node, in_bytes(Klass::layout_helper_offset())); |
2938 return make_load(NULL, lhp, TypeInt::INT, T_INT); | 2943 return make_load(NULL, lhp, TypeInt::INT, T_INT); |
2939 } | 2944 } |
2940 | 2945 |
2941 // We just put in an allocate/initialize with a big raw-memory effect. | 2946 // We just put in an allocate/initialize with a big raw-memory effect. |
2942 // Hook selected additional alias categories on the initialization. | 2947 // Hook selected additional alias categories on the initialization. |
3335 } | 3340 } |
3336 } | 3341 } |
3337 return NULL; | 3342 return NULL; |
3338 } | 3343 } |
3339 | 3344 |
3345 // Trace Allocate -> Proj[Parm] -> MemBarStoreStore | |
3346 MemBarStoreStoreNode* AllocateNode::storestore() { | |
3347 ProjNode* rawoop = proj_out(AllocateNode::RawAddress); | |
3348 if (rawoop == NULL) return NULL; | |
3349 for (DUIterator_Fast imax, i = rawoop->fast_outs(imax); i < imax; i++) { | |
3350 Node* storestore = rawoop->fast_out(i); | |
3351 if (storestore->is_MemBarStoreStore()) { | |
3352 return storestore->as_MemBarStoreStore(); | |
3353 } | |
3354 } | |
3355 return NULL; | |
3356 } | |
3357 | |
3340 //----------------------------- loop predicates --------------------------- | 3358 //----------------------------- loop predicates --------------------------- |
3341 | 3359 |
3342 //------------------------------add_predicate_impl---------------------------- | 3360 //------------------------------add_predicate_impl---------------------------- |
3343 void GraphKit::add_predicate_impl(Deoptimization::DeoptReason reason, int nargs) { | 3361 void GraphKit::add_predicate_impl(Deoptimization::DeoptReason reason, int nargs) { |
3344 // Too many traps seen? | 3362 // Too many traps seen? |