src/share/vm/opto/connode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/opto/connode.cpp
src/share/vm/opto/connode.cpp
Print this page
rev 6132 : 8031755: Type speculation should be used to optimize explicit null checks
Summary: feed profiling data about reference nullness to type speculation.
Reviewed-by:
*** 397,407 ****
//------------------------------Value------------------------------------------
// Take 'join' of input and cast-up type
const Type *ConstraintCastNode::Value( PhaseTransform *phase ) const {
if( in(0) && phase->type(in(0)) == Type::TOP ) return Type::TOP;
! const Type* ft = phase->type(in(1))->filter_speculative(_type);
#ifdef ASSERT
// Previous versions of this function had some special case logic,
// which is no longer necessary. Make sure of the required effects.
switch (Opcode()) {
--- 397,407 ----
//------------------------------Value------------------------------------------
// Take 'join' of input and cast-up type
const Type *ConstraintCastNode::Value( PhaseTransform *phase ) const {
if( in(0) && phase->type(in(0)) == Type::TOP ) return Type::TOP;
! const Type* ft = phase->type(in(1))->filter_speculative(_type);
#ifdef ASSERT
// Previous versions of this function had some special case logic,
// which is no longer necessary. Make sure of the required effects.
switch (Opcode()) {
*** 491,501 ****
: in_type;
} else {
result = my_type->cast_to_ptr_type( my_type->join_ptr(in_ptr) );
}
}
! return result;
// JOIN NOT DONE HERE BECAUSE OF INTERFACE ISSUES.
// FIX THIS (DO THE JOIN) WHEN UNION TYPES APPEAR!
//
--- 491,511 ----
: in_type;
} else {
result = my_type->cast_to_ptr_type( my_type->join_ptr(in_ptr) );
}
}
!
! // This is the code from TypePtr::xmeet() that prevents us from
! // having 2 ways to represent the same type. We have to replicate it
! // here because we don't go through meet/join.
! if (result->remove_speculative() == result->speculative()) {
! result = result->remove_speculative();
! }
!
! // Same as above: because we don't go through meet/join, remove the
! // speculative type if we know we won't use it.
! return result->cleanup_speculative();
// JOIN NOT DONE HERE BECAUSE OF INTERFACE ISSUES.
// FIX THIS (DO THE JOIN) WHEN UNION TYPES APPEAR!
//
src/share/vm/opto/connode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File