mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
Add LoadNKlass and CMoveN nodes, use CmpN and ConN nodes to generate narrow oops compare instructions. Reviewed-by: never, rasbold
This commit is contained in:
parent
757229db71
commit
76035424de
29 changed files with 428 additions and 128 deletions
|
@ -38,12 +38,12 @@ ConNode *ConNode::make( Compile* C, const Type *t ) {
|
|||
if (t->isa_narrowoop()) return new (C, 1) ConNNode( t->is_narrowoop() );
|
||||
switch( t->basic_type() ) {
|
||||
case T_INT: return new (C, 1) ConINode( t->is_int() );
|
||||
case T_ARRAY: return new (C, 1) ConPNode( t->is_aryptr() );
|
||||
case T_LONG: return new (C, 1) ConLNode( t->is_long() );
|
||||
case T_FLOAT: return new (C, 1) ConFNode( t->is_float_constant() );
|
||||
case T_DOUBLE: return new (C, 1) ConDNode( t->is_double_constant() );
|
||||
case T_VOID: return new (C, 1) ConNode ( Type::TOP );
|
||||
case T_OBJECT: return new (C, 1) ConPNode( t->is_oopptr() );
|
||||
case T_ARRAY: return new (C, 1) ConPNode( t->is_aryptr() );
|
||||
case T_ADDRESS: return new (C, 1) ConPNode( t->is_ptr() );
|
||||
// Expected cases: TypePtr::NULL_PTR, any is_rawptr()
|
||||
// Also seen: AnyPtr(TopPTR *+top); from command line:
|
||||
|
@ -185,6 +185,7 @@ CMoveNode *CMoveNode::make( Compile *C, Node *c, Node *bol, Node *left, Node *ri
|
|||
case T_LONG: return new (C, 4) CMoveLNode( bol, left, right, t->is_long() );
|
||||
case T_OBJECT: return new (C, 4) CMovePNode( c, bol, left, right, t->is_oopptr() );
|
||||
case T_ADDRESS: return new (C, 4) CMovePNode( c, bol, left, right, t->is_ptr() );
|
||||
case T_NARROWOOP: return new (C, 4) CMoveNNode( c, bol, left, right, t );
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
return NULL;
|
||||
|
@ -570,7 +571,7 @@ const Type *DecodeNNode::Value( PhaseTransform *phase ) const {
|
|||
return bottom_type();
|
||||
}
|
||||
|
||||
Node* DecodeNNode::decode(PhaseGVN* phase, Node* value) {
|
||||
Node* DecodeNNode::decode(PhaseTransform* phase, Node* value) {
|
||||
if (value->Opcode() == Op_EncodeP) {
|
||||
// (DecodeN (EncodeP p)) -> p
|
||||
return value->in(1);
|
||||
|
@ -604,7 +605,7 @@ const Type *EncodePNode::Value( PhaseTransform *phase ) const {
|
|||
return bottom_type();
|
||||
}
|
||||
|
||||
Node* EncodePNode::encode(PhaseGVN* phase, Node* value) {
|
||||
Node* EncodePNode::encode(PhaseTransform* phase, Node* value) {
|
||||
if (value->Opcode() == Op_DecodeN) {
|
||||
// (EncodeP (DecodeN p)) -> p
|
||||
return value->in(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue