Mercurial > hg > truffle
diff src/share/vm/opto/connode.hpp @ 113:ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv
Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author | coleenp |
---|---|
date | Sun, 13 Apr 2008 17:43:42 -0400 |
parents | a61af66fc99e |
children | b130b98db9cf |
line wrap: on
line diff
--- a/src/share/vm/opto/connode.hpp Fri Apr 11 09:56:35 2008 -0400 +++ b/src/share/vm/opto/connode.hpp Sun Apr 13 17:43:42 2008 -0400 @@ -78,6 +78,20 @@ }; +//------------------------------ConNNode-------------------------------------- +// Simple narrow oop constants +class ConNNode : public ConNode { +public: + ConNNode( const TypeNarrowOop *t ) : ConNode(t) {} + virtual int Opcode() const; + + static ConNNode* make( Compile *C, ciObject* con ) { + return new (C, 1) ConNNode( TypeNarrowOop::make_from_constant(con) ); + } + +}; + + //------------------------------ConLNode--------------------------------------- // Simple long constants class ConLNode : public ConNode { @@ -254,6 +268,41 @@ //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_req(0, NULL); + init_req(1, value); + } + virtual int Opcode() const; + virtual Node *Identity( PhaseTransform *phase ); + virtual uint ideal_reg() const { return Op_RegN; } + + static Node* encode(PhaseGVN* phase, Node* value); +}; + +//------------------------------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_req(0, NULL); + init_req(1, value); + } + virtual int Opcode() const; + virtual Node *Identity( PhaseTransform *phase ); + 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 {