mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6689060: Escape Analysis does not work with Compressed Oops
64-bits VM crashes with -XX:+AggresiveOpts (Escape Analysis + Compressed Oops) Reviewed-by: never, sgoldman
This commit is contained in:
parent
8ece15fd05
commit
69155d87f9
13 changed files with 235 additions and 51 deletions
|
@ -584,7 +584,7 @@ bool PhaseMacroExpand::scalar_replacement(AllocateNode *alloc, GrowableArray <Sa
|
|||
|
||||
const Type *field_type;
|
||||
// The next code is taken from Parse::do_get_xxx().
|
||||
if (basic_elem_type == T_OBJECT) {
|
||||
if (basic_elem_type == T_OBJECT || basic_elem_type == T_ARRAY) {
|
||||
if (!elem_type->is_loaded()) {
|
||||
field_type = TypeInstPtr::BOTTOM;
|
||||
} else if (field != NULL && field->is_constant()) {
|
||||
|
@ -597,6 +597,10 @@ bool PhaseMacroExpand::scalar_replacement(AllocateNode *alloc, GrowableArray <Sa
|
|||
} else {
|
||||
field_type = TypeOopPtr::make_from_klass(elem_type->as_klass());
|
||||
}
|
||||
if (UseCompressedOops) {
|
||||
field_type = field_type->is_oopptr()->make_narrowoop();
|
||||
basic_elem_type = T_NARROWOOP;
|
||||
}
|
||||
} else {
|
||||
field_type = Type::get_const_basic_type(basic_elem_type);
|
||||
}
|
||||
|
@ -659,6 +663,13 @@ bool PhaseMacroExpand::scalar_replacement(AllocateNode *alloc, GrowableArray <Sa
|
|||
#endif
|
||||
return false;
|
||||
}
|
||||
if (UseCompressedOops && field_type->isa_narrowoop()) {
|
||||
// Enable "DecodeN(EncodeP(Allocate)) --> Allocate" transformation
|
||||
// to be able scalar replace the allocation.
|
||||
_igvn.set_delay_transform(false);
|
||||
field_val = DecodeNNode::decode(&_igvn, field_val);
|
||||
_igvn.set_delay_transform(true);
|
||||
}
|
||||
sfpt->add_req(field_val);
|
||||
}
|
||||
JVMState *jvms = sfpt->jvms();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue