changeset 38030 | 93f24e7b3c43 |
parent 38018 | 1dc6c6f21231 |
child 38033 | 996ce936543f |
38029:c645d414429f | 38030:93f24e7b3c43 |
---|---|
2548 |
2548 |
2549 if (!is_store) { |
2549 if (!is_store) { |
2550 Node* p = NULL; |
2550 Node* p = NULL; |
2551 // Try to constant fold a load from a constant field |
2551 // Try to constant fold a load from a constant field |
2552 ciField* field = alias_type->field(); |
2552 ciField* field = alias_type->field(); |
2553 if (heap_base_oop != top() && |
2553 if (heap_base_oop != top() && field != NULL && field->is_constant() && !mismatched) { |
2554 field != NULL && field->is_constant() && !mismatched) { |
|
2555 // final or stable field |
2554 // final or stable field |
2556 const Type* con_type = Type::make_constant(alias_type->field(), heap_base_oop); |
2555 p = make_constant_from_field(field, heap_base_oop); |
2557 if (con_type != NULL) { |
|
2558 p = makecon(con_type); |
|
2559 } |
|
2560 } |
2556 } |
2561 if (p == NULL) { |
2557 if (p == NULL) { |
2562 // To be valid, unsafe loads may depend on other conditions than |
2558 // To be valid, unsafe loads may depend on other conditions than |
2563 // the one that guards them: pin the Load node |
2559 // the one that guards them: pin the Load node |
2564 p = make_load(control(), adr, value_type, type, adr_type, mo, LoadNode::Pinned, requires_atomic_access, unaligned, mismatched); |
2560 p = make_load(control(), adr, value_type, type, adr_type, mo, LoadNode::Pinned, requires_atomic_access, unaligned, mismatched); |