comparison src/share/vm/opto/connode.hpp @ 6848:8e47bac5643a

7054512: Compress class pointers after perm gen removal Summary: support of compress class pointers in the compilers. Reviewed-by: kvn, twisti
author roland
date Tue, 09 Oct 2012 10:11:38 +0200
parents e626685e9f6c
children d804e148cff8
comparison
equal deleted inserted replaced
6847:65d07d9ee446 6848:8e47bac5643a
86 public: 86 public:
87 ConNNode( const TypeNarrowOop *t ) : ConNode(t) {} 87 ConNNode( const TypeNarrowOop *t ) : ConNode(t) {}
88 virtual int Opcode() const; 88 virtual int Opcode() const;
89 }; 89 };
90 90
91 //------------------------------ConNKlassNode---------------------------------
92 // Simple narrow klass constants
93 class ConNKlassNode : public ConNode {
94 public:
95 ConNKlassNode( const TypeNarrowKlass *t ) : ConNode(t) {}
96 virtual int Opcode() const;
97 };
98
91 99
92 //------------------------------ConLNode--------------------------------------- 100 //------------------------------ConLNode---------------------------------------
93 // Simple long constants 101 // Simple long constants
94 class ConLNode : public ConNode { 102 class ConLNode : public ConNode {
95 public: 103 public:
268 // the proper address type - which is required to compute anti-deps. 276 // the proper address type - which is required to compute anti-deps.
269 //virtual Node *Ideal_DU_postCCP( PhaseCCP * ); 277 //virtual Node *Ideal_DU_postCCP( PhaseCCP * );
270 }; 278 };
271 279
272 280
281 //------------------------------EncodeNarrowPtr--------------------------------
282 class EncodeNarrowPtrNode : public TypeNode {
283 protected:
284 EncodeNarrowPtrNode(Node* value, const Type* type):
285 TypeNode(type, 2) {
286 init_class_id(Class_EncodeNarrowPtr);
287 init_req(0, NULL);
288 init_req(1, value);
289 }
290 public:
291 virtual uint ideal_reg() const { return Op_RegN; }
292 virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp );
293 };
294
273 //------------------------------EncodeP-------------------------------- 295 //------------------------------EncodeP--------------------------------
274 // Encodes an oop pointers into its compressed form 296 // Encodes an oop pointers into its compressed form
275 // Takes an extra argument which is the real heap base as a long which 297 // Takes an extra argument which is the real heap base as a long which
276 // may be useful for code generation in the backend. 298 // may be useful for code generation in the backend.
277 class EncodePNode : public TypeNode { 299 class EncodePNode : public EncodeNarrowPtrNode {
278 public: 300 public:
279 EncodePNode(Node* value, const Type* type): 301 EncodePNode(Node* value, const Type* type):
302 EncodeNarrowPtrNode(value, type) {
303 init_class_id(Class_EncodeP);
304 }
305 virtual int Opcode() const;
306 virtual Node *Identity( PhaseTransform *phase );
307 virtual const Type *Value( PhaseTransform *phase ) const;
308 };
309
310 //------------------------------EncodePKlass--------------------------------
311 // Encodes a klass pointer into its compressed form
312 // Takes an extra argument which is the real heap base as a long which
313 // may be useful for code generation in the backend.
314 class EncodePKlassNode : public EncodeNarrowPtrNode {
315 public:
316 EncodePKlassNode(Node* value, const Type* type):
317 EncodeNarrowPtrNode(value, type) {
318 init_class_id(Class_EncodePKlass);
319 }
320 virtual int Opcode() const;
321 virtual Node *Identity( PhaseTransform *phase );
322 virtual const Type *Value( PhaseTransform *phase ) const;
323 };
324
325 //------------------------------DecodeNarrowPtr--------------------------------
326 class DecodeNarrowPtrNode : public TypeNode {
327 protected:
328 DecodeNarrowPtrNode(Node* value, const Type* type):
280 TypeNode(type, 2) { 329 TypeNode(type, 2) {
281 init_class_id(Class_EncodeP); 330 init_class_id(Class_DecodeNarrowPtr);
282 init_req(0, NULL); 331 init_req(0, NULL);
283 init_req(1, value); 332 init_req(1, value);
284 } 333 }
285 virtual int Opcode() const; 334 public:
286 virtual Node *Identity( PhaseTransform *phase ); 335 virtual uint ideal_reg() const { return Op_RegP; }
287 virtual const Type *Value( PhaseTransform *phase ) const;
288 virtual uint ideal_reg() const { return Op_RegN; }
289
290 virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp );
291 }; 336 };
292 337
293 //------------------------------DecodeN-------------------------------- 338 //------------------------------DecodeN--------------------------------
294 // Converts a narrow oop into a real oop ptr. 339 // Converts a narrow oop into a real oop ptr.
295 // Takes an extra argument which is the real heap base as a long which 340 // Takes an extra argument which is the real heap base as a long which
296 // may be useful for code generation in the backend. 341 // may be useful for code generation in the backend.
297 class DecodeNNode : public TypeNode { 342 class DecodeNNode : public DecodeNarrowPtrNode {
298 public: 343 public:
299 DecodeNNode(Node* value, const Type* type): 344 DecodeNNode(Node* value, const Type* type):
300 TypeNode(type, 2) { 345 DecodeNarrowPtrNode(value, type) {
301 init_class_id(Class_DecodeN); 346 init_class_id(Class_DecodeN);
302 init_req(0, NULL); 347 }
303 init_req(1, value); 348 virtual int Opcode() const;
304 } 349 virtual const Type *Value( PhaseTransform *phase ) const;
305 virtual int Opcode() const; 350 virtual Node *Identity( PhaseTransform *phase );
306 virtual Node *Identity( PhaseTransform *phase ); 351 };
307 virtual const Type *Value( PhaseTransform *phase ) const; 352
308 virtual uint ideal_reg() const { return Op_RegP; } 353 //------------------------------DecodeNKlass--------------------------------
354 // Converts a narrow klass pointer into a real klass ptr.
355 // Takes an extra argument which is the real heap base as a long which
356 // may be useful for code generation in the backend.
357 class DecodeNKlassNode : public DecodeNarrowPtrNode {
358 public:
359 DecodeNKlassNode(Node* value, const Type* type):
360 DecodeNarrowPtrNode(value, type) {
361 init_class_id(Class_DecodeNKlass);
362 }
363 virtual int Opcode() const;
364 virtual const Type *Value( PhaseTransform *phase ) const;
365 virtual Node *Identity( PhaseTransform *phase );
309 }; 366 };
310 367
311 //------------------------------Conv2BNode------------------------------------- 368 //------------------------------Conv2BNode-------------------------------------
312 // Convert int/pointer to a Boolean. Map zero to zero, all else to 1. 369 // Convert int/pointer to a Boolean. Map zero to zero, all else to 1.
313 class Conv2BNode : public Node { 370 class Conv2BNode : public Node {