mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +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
|
@ -161,6 +161,10 @@ public:
|
|||
// then call the virtual add() to set the type.
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
|
||||
// Common methods for LoadKlass and LoadNKlass nodes.
|
||||
const Type *klass_value_common( PhaseTransform *phase ) const;
|
||||
Node *klass_identity_common( PhaseTransform *phase );
|
||||
|
||||
virtual uint ideal_reg() const;
|
||||
virtual const Type *bottom_type() const;
|
||||
// Following method is copied from TypeNode:
|
||||
|
@ -362,14 +366,35 @@ public:
|
|||
// Load a Klass from an object
|
||||
class LoadKlassNode : public LoadPNode {
|
||||
public:
|
||||
LoadKlassNode( Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeKlassPtr *tk = TypeKlassPtr::OBJECT )
|
||||
LoadKlassNode( Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeKlassPtr *tk )
|
||||
: LoadPNode(c,mem,adr,at,tk) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual bool depends_only_on_test() const { return true; }
|
||||
|
||||
// Polymorphic factory method:
|
||||
static Node* make( PhaseGVN& gvn, Node *mem, Node *adr, const TypePtr* at,
|
||||
const TypeKlassPtr *tk = TypeKlassPtr::OBJECT );
|
||||
};
|
||||
|
||||
//------------------------------LoadNKlassNode---------------------------------
|
||||
// Load a narrow Klass from an object.
|
||||
class LoadNKlassNode : public LoadNNode {
|
||||
public:
|
||||
LoadNKlassNode( Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeNarrowOop *tk )
|
||||
: LoadNNode(c,mem,adr,at,tk) {}
|
||||
virtual int Opcode() const;
|
||||
virtual uint ideal_reg() const { return Op_RegN; }
|
||||
virtual int store_Opcode() const { return Op_StoreN; }
|
||||
virtual BasicType memory_type() const { return T_NARROWOOP; }
|
||||
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual bool depends_only_on_test() const { return true; }
|
||||
};
|
||||
|
||||
|
||||
//------------------------------LoadSNode--------------------------------------
|
||||
// Load a short (16bits signed) from memory
|
||||
class LoadSNode : public LoadNode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue