src/share/vm/opto/connode.hpp

Print this page
rev 3688 : 7054512: Compress class pointers after perm gen removal
Summary: support of compress class pointers in the compilers.
Reviewed-by:

*** 86,95 **** --- 86,103 ---- public: ConNNode( const TypeNarrowOop *t ) : ConNode(t) {} virtual int Opcode() const; }; + //------------------------------ConNKlassNode--------------------------------- + // Simple narrow klass constants + class ConNKlassNode : public ConNode { + public: + ConNKlassNode( const TypeNarrowKlass *t ) : ConNode(t) {} + virtual int Opcode() const; + }; + //------------------------------ConLNode--------------------------------------- // Simple long constants class ConLNode : public ConNode { public:
*** 268,313 **** // the proper address type - which is required to compute anti-deps. //virtual Node *Ideal_DU_postCCP( PhaseCCP * ); }; //------------------------------EncodeP-------------------------------- // Encodes an oop pointers into its compressed form // Takes an extra argument which is the real heap base as a long which // may be useful for code generation in the backend. ! class EncodePNode : public TypeNode { public: EncodePNode(Node* value, const Type* type): ! TypeNode(type, 2) { init_class_id(Class_EncodeP); - init_req(0, NULL); - init_req(1, value); } virtual int Opcode() const; virtual Node *Identity( PhaseTransform *phase ); virtual const Type *Value( PhaseTransform *phase ) const; ! virtual uint ideal_reg() const { return Op_RegN; } ! virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp ); }; //------------------------------DecodeN-------------------------------- // Converts a narrow oop into a real oop ptr. // Takes an extra argument which is the real heap base as a long which // may be useful for code generation in the backend. ! class DecodeNNode : public TypeNode { public: DecodeNNode(Node* value, const Type* type): ! TypeNode(type, 2) { init_class_id(Class_DecodeN); - init_req(0, NULL); - init_req(1, value); } virtual int Opcode() const; virtual Node *Identity( PhaseTransform *phase ); virtual const Type *Value( PhaseTransform *phase ) const; ! virtual uint ideal_reg() const { return Op_RegP; } }; //------------------------------Conv2BNode------------------------------------- // Convert int/pointer to a Boolean. Map zero to zero, all else to 1. class Conv2BNode : public Node { --- 276,370 ---- // the proper address type - which is required to compute anti-deps. //virtual Node *Ideal_DU_postCCP( PhaseCCP * ); }; + //------------------------------EncodeNarrowPtr-------------------------------- + class EncodeNarrowPtrNode : public TypeNode { + protected: + EncodeNarrowPtrNode(Node* value, const Type* type): + TypeNode(type, 2) { + init_class_id(Class_EncodeNarrowPtr); + init_req(0, NULL); + init_req(1, value); + } + public: + virtual uint ideal_reg() const { return Op_RegN; } + virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp ); + }; + //------------------------------EncodeP-------------------------------- // Encodes an oop pointers into its compressed form // Takes an extra argument which is the real heap base as a long which // may be useful for code generation in the backend. ! class EncodePNode : public EncodeNarrowPtrNode { public: EncodePNode(Node* value, const Type* type): ! EncodeNarrowPtrNode(value, type) { init_class_id(Class_EncodeP); } virtual int Opcode() const; virtual Node *Identity( PhaseTransform *phase ); virtual const Type *Value( PhaseTransform *phase ) const; ! }; ! //------------------------------EncodePKlass-------------------------------- ! // Encodes a klass pointer into its compressed form ! // Takes an extra argument which is the real heap base as a long which ! // may be useful for code generation in the backend. ! class EncodePKlassNode : public EncodeNarrowPtrNode { ! public: ! EncodePKlassNode(Node* value, const Type* type): ! EncodeNarrowPtrNode(value, type) { ! init_class_id(Class_EncodePKlass); ! } ! virtual int Opcode() const; ! virtual Node *Identity( PhaseTransform *phase ); ! virtual const Type *Value( PhaseTransform *phase ) const; ! }; ! ! //------------------------------DecodeNarrowPtr-------------------------------- ! class DecodeNarrowPtrNode : public TypeNode { ! protected: ! DecodeNarrowPtrNode(Node* value, const Type* type): ! TypeNode(type, 2) { ! init_class_id(Class_DecodeNarrowPtr); ! init_req(0, NULL); ! init_req(1, value); ! } ! public: ! virtual uint ideal_reg() const { return Op_RegP; } }; //------------------------------DecodeN-------------------------------- // Converts a narrow oop into a real oop ptr. // Takes an extra argument which is the real heap base as a long which // may be useful for code generation in the backend. ! class DecodeNNode : public DecodeNarrowPtrNode { public: DecodeNNode(Node* value, const Type* type): ! DecodeNarrowPtrNode(value, type) { init_class_id(Class_DecodeN); } virtual int Opcode() const; + virtual const Type *Value( PhaseTransform *phase ) const; virtual Node *Identity( PhaseTransform *phase ); + }; + + //------------------------------DecodeNKlass-------------------------------- + // Converts a narrow klass pointer into a real klass ptr. + // Takes an extra argument which is the real heap base as a long which + // may be useful for code generation in the backend. + class DecodeNKlassNode : public DecodeNarrowPtrNode { + public: + DecodeNKlassNode(Node* value, const Type* type): + DecodeNarrowPtrNode(value, type) { + init_class_id(Class_DecodeNKlass); + } + virtual int Opcode() const; virtual const Type *Value( PhaseTransform *phase ) const; ! virtual Node *Identity( PhaseTransform *phase ); }; //------------------------------Conv2BNode------------------------------------- // Convert int/pointer to a Boolean. Map zero to zero, all else to 1. class Conv2BNode : public Node {