34 EncodeNarrowPtrNode(Node* value, const Type* type): 35 TypeNode(type, 2) { 36 init_class_id(Class_EncodeNarrowPtr); 37 init_req(0, NULL); 38 init_req(1, value); 39 } 40 public: 41 virtual uint ideal_reg() const { return Op_RegN; } 42 }; 43 44 //------------------------------EncodeP-------------------------------- 45 // Encodes an oop pointers into its compressed form 46 // Takes an extra argument which is the real heap base as a long which 47 // may be useful for code generation in the backend. 48 class EncodePNode : public EncodeNarrowPtrNode { 49 public: 50 EncodePNode(Node* value, const Type* type): 51 EncodeNarrowPtrNode(value, type) { 52 init_class_id(Class_EncodeP); 53 } 54 virtual int Opcode() const; 55 virtual Node* Identity(PhaseGVN* phase); 56 virtual const Type* Value(PhaseGVN* phase) const; 57 }; 58 59 //------------------------------EncodePKlass-------------------------------- 60 // Encodes a klass pointer into its compressed form 61 // Takes an extra argument which is the real heap base as a long which 62 // may be useful for code generation in the backend. 63 class EncodePKlassNode : public EncodeNarrowPtrNode { 64 public: 65 EncodePKlassNode(Node* value, const Type* type): 66 EncodeNarrowPtrNode(value, type) { 67 init_class_id(Class_EncodePKlass); 68 } 69 virtual int Opcode() const; 70 virtual Node* Identity(PhaseGVN* phase); 71 virtual const Type* Value(PhaseGVN* phase) const; 72 }; 73 74 //------------------------------DecodeNarrowPtr-------------------------------- 75 class DecodeNarrowPtrNode : public TypeNode { 76 protected: 77 DecodeNarrowPtrNode(Node* value, const Type* type): 78 TypeNode(type, 2) { 79 init_class_id(Class_DecodeNarrowPtr); 80 init_req(0, NULL); 81 init_req(1, value); 82 } 83 public: 84 virtual uint ideal_reg() const { return Op_RegP; } 85 }; 86 87 //------------------------------DecodeN-------------------------------- 88 // Converts a narrow oop into a real oop ptr. 89 // Takes an extra argument which is the real heap base as a long which 90 // may be useful for code generation in the backend. 91 class DecodeNNode : public DecodeNarrowPtrNode { 92 public: 93 DecodeNNode(Node* value, const Type* type): 94 DecodeNarrowPtrNode(value, type) { 95 init_class_id(Class_DecodeN); 96 } 97 virtual int Opcode() const; 98 virtual const Type* Value(PhaseGVN* phase) const; 99 virtual Node* Identity(PhaseGVN* phase); 100 }; 101 102 //------------------------------DecodeNKlass-------------------------------- 103 // Converts a narrow klass pointer into a real klass ptr. 104 // Takes an extra argument which is the real heap base as a long which 105 // may be useful for code generation in the backend. 106 class DecodeNKlassNode : public DecodeNarrowPtrNode { 107 public: 108 DecodeNKlassNode(Node* value, const Type* type): 109 DecodeNarrowPtrNode(value, type) { 110 init_class_id(Class_DecodeNKlass); 111 } 112 virtual int Opcode() const; 113 virtual const Type* Value(PhaseGVN* phase) const; 114 virtual Node* Identity(PhaseGVN* phase); 115 }; 116 117 #endif // SHARE_VM_OPTO_NARROWPTRNODE_HPP 118 | 34 EncodeNarrowPtrNode(Node* value, const Type* type): 35 TypeNode(type, 2) { 36 init_class_id(Class_EncodeNarrowPtr); 37 init_req(0, NULL); 38 init_req(1, value); 39 } 40 public: 41 virtual uint ideal_reg() const { return Op_RegN; } 42 }; 43 44 //------------------------------EncodeP-------------------------------- 45 // Encodes an oop pointers into its compressed form 46 // Takes an extra argument which is the real heap base as a long which 47 // may be useful for code generation in the backend. 48 class EncodePNode : public EncodeNarrowPtrNode { 49 public: 50 EncodePNode(Node* value, const Type* type): 51 EncodeNarrowPtrNode(value, type) { 52 init_class_id(Class_EncodeP); 53 } 54 virtual uint Opcode() const; 55 virtual Node* Identity(PhaseGVN* phase); 56 virtual const Type* Value(PhaseGVN* phase) const; 57 }; 58 59 //------------------------------EncodePKlass-------------------------------- 60 // Encodes a klass pointer into its compressed form 61 // Takes an extra argument which is the real heap base as a long which 62 // may be useful for code generation in the backend. 63 class EncodePKlassNode : public EncodeNarrowPtrNode { 64 public: 65 EncodePKlassNode(Node* value, const Type* type): 66 EncodeNarrowPtrNode(value, type) { 67 init_class_id(Class_EncodePKlass); 68 } 69 virtual uint Opcode() const; 70 virtual Node* Identity(PhaseGVN* phase); 71 virtual const Type* Value(PhaseGVN* phase) const; 72 }; 73 74 //------------------------------DecodeNarrowPtr-------------------------------- 75 class DecodeNarrowPtrNode : public TypeNode { 76 protected: 77 DecodeNarrowPtrNode(Node* value, const Type* type): 78 TypeNode(type, 2) { 79 init_class_id(Class_DecodeNarrowPtr); 80 init_req(0, NULL); 81 init_req(1, value); 82 } 83 public: 84 virtual uint ideal_reg() const { return Op_RegP; } 85 }; 86 87 //------------------------------DecodeN-------------------------------- 88 // Converts a narrow oop into a real oop ptr. 89 // Takes an extra argument which is the real heap base as a long which 90 // may be useful for code generation in the backend. 91 class DecodeNNode : public DecodeNarrowPtrNode { 92 public: 93 DecodeNNode(Node* value, const Type* type): 94 DecodeNarrowPtrNode(value, type) { 95 init_class_id(Class_DecodeN); 96 } 97 virtual uint Opcode() const; 98 virtual const Type* Value(PhaseGVN* phase) const; 99 virtual Node* Identity(PhaseGVN* phase); 100 }; 101 102 //------------------------------DecodeNKlass-------------------------------- 103 // Converts a narrow klass pointer into a real klass ptr. 104 // Takes an extra argument which is the real heap base as a long which 105 // may be useful for code generation in the backend. 106 class DecodeNKlassNode : public DecodeNarrowPtrNode { 107 public: 108 DecodeNKlassNode(Node* value, const Type* type): 109 DecodeNarrowPtrNode(value, type) { 110 init_class_id(Class_DecodeNKlass); 111 } 112 virtual uint Opcode() const; 113 virtual const Type* Value(PhaseGVN* phase) const; 114 virtual Node* Identity(PhaseGVN* phase); 115 }; 116 117 #endif // SHARE_VM_OPTO_NARROWPTRNODE_HPP 118 |