hotspot/src/share/vm/opto/connode.hpp
Print this page
rev 611 : Merge
*** 1,10 ****
#ifdef USE_PRAGMA_IDENT_HDR
#pragma ident "@(#)connode.hpp 1.160 07/05/05 17:06:13 JVM"
#endif
/*
! * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,10 ----
#ifdef USE_PRAGMA_IDENT_HDR
#pragma ident "@(#)connode.hpp 1.160 07/05/05 17:06:13 JVM"
#endif
/*
! * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 71,85 ****
if (con == NULL)
return new (C, 1) ConPNode( TypePtr::NULL_PTR ) ;
else
return new (C, 1) ConPNode( TypeRawPtr::make(con) );
}
- static ConPNode* make( Compile *C, ciObject* con ) {
- return new (C, 1) ConPNode( TypeOopPtr::make_from_constant(con) );
- }
};
//------------------------------ConLNode---------------------------------------
// Simple long constants
--- 71,89 ----
if (con == NULL)
return new (C, 1) ConPNode( TypePtr::NULL_PTR ) ;
else
return new (C, 1) ConPNode( TypeRawPtr::make(con) );
}
+ };
+ //------------------------------ConNNode--------------------------------------
+ // Simple narrow oop constants
+ class ConNNode : public ConNode {
+ public:
+ ConNNode( const TypeNarrowOop *t ) : ConNode(t) {}
+ virtual int Opcode() const;
};
//------------------------------ConLNode---------------------------------------
// Simple long constants
*** 197,207 ****
public:
CMovePNode( Node *c, Node *bol, Node *left, Node *right, const TypePtr* t ) : CMoveNode(bol,left,right,t) { init_req(Control,c); }
virtual int Opcode() const;
};
! //------------------------------ConstraintCastNode-------------------------------------
// cast to a different range
class ConstraintCastNode: public TypeNode {
public:
ConstraintCastNode (Node *n, const Type *t ): TypeNode(t,2) {
init_class_id(Class_ConstraintCast);
--- 201,218 ----
public:
CMovePNode( Node *c, Node *bol, Node *left, Node *right, const TypePtr* t ) : CMoveNode(bol,left,right,t) { init_req(Control,c); }
virtual int Opcode() const;
};
! //------------------------------CMoveNNode-------------------------------------
! class CMoveNNode : public CMoveNode {
! public:
! CMoveNNode( Node *c, Node *bol, Node *left, Node *right, const Type* t ) : CMoveNode(bol,left,right,t) { init_req(Control,c); }
! virtual int Opcode() const;
! };
!
! //------------------------------ConstraintCastNode-----------------------------
// cast to a different range
class ConstraintCastNode: public TypeNode {
public:
ConstraintCastNode (Node *n, const Type *t ): TypeNode(t,2) {
init_class_id(Class_ConstraintCast);
*** 226,239 ****
//------------------------------CastPPNode-------------------------------------
// cast pointer to pointer (different type)
class CastPPNode: public ConstraintCastNode {
public:
! CastPPNode (Node *n, const Type *t ): ConstraintCastNode(n, t) {
! // Only CastPP is safe. CastII can cause optimizer loops.
! init_flags(Flag_is_dead_loop_safe);
! }
virtual int Opcode() const;
virtual uint ideal_reg() const { return Op_RegP; }
virtual Node *Ideal_DU_postCCP( PhaseCCP * );
};
--- 237,247 ----
//------------------------------CastPPNode-------------------------------------
// cast pointer to pointer (different type)
class CastPPNode: public ConstraintCastNode {
public:
! CastPPNode (Node *n, const Type *t ): ConstraintCastNode(n, t) {}
virtual int Opcode() const;
virtual uint ideal_reg() const { return Op_RegP; }
virtual Node *Ideal_DU_postCCP( PhaseCCP * );
};
*** 241,264 ****
// for _checkcast, cast pointer to pointer (different type), without JOIN,
class CheckCastPPNode: public TypeNode {
public:
CheckCastPPNode( Node *c, Node *n, const Type *t ) : TypeNode(t,2) {
init_class_id(Class_CheckCastPP);
- init_flags(Flag_is_dead_loop_safe);
init_req(0, c);
init_req(1, n);
}
virtual Node *Identity( PhaseTransform *phase );
virtual const Type *Value( PhaseTransform *phase ) const;
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
virtual int Opcode() const;
virtual uint ideal_reg() const { return Op_RegP; }
// No longer remove CheckCast after CCP as it gives me a place to hang
// the proper address type - which is required to compute anti-deps.
//virtual Node *Ideal_DU_postCCP( PhaseCCP * );
};
//------------------------------Conv2BNode-------------------------------------
// Convert int/pointer to a Boolean. Map zero to zero, all else to 1.
class Conv2BNode : public Node {
public:
Conv2BNode( Node *i ) : Node(0,i) {}
--- 249,311 ----
// for _checkcast, cast pointer to pointer (different type), without JOIN,
class CheckCastPPNode: public TypeNode {
public:
CheckCastPPNode( Node *c, Node *n, const Type *t ) : TypeNode(t,2) {
init_class_id(Class_CheckCastPP);
init_req(0, c);
init_req(1, n);
}
+
virtual Node *Identity( PhaseTransform *phase );
virtual const Type *Value( PhaseTransform *phase ) const;
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
virtual int Opcode() const;
virtual uint ideal_reg() const { return Op_RegP; }
// No longer remove CheckCast after CCP as it gives me a place to hang
// 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 {
public:
Conv2BNode( Node *i ) : Node(0,i) {}
*** 500,513 ****
// Stops value-numbering, Ideal calls or Identity functions.
class Opaque1Node : public Node {
virtual uint hash() const ; // { return NO_HASH; }
virtual uint cmp( const Node &n ) const;
public:
! Opaque1Node( Node *n ) : Node(0,n) {}
// Special version for the pre-loop to hold the original loop limit
// which is consumed by range check elimination.
! Opaque1Node( Node *n, Node* orig_limit ) : Node(0,n,orig_limit) {}
Node* original_loop_limit() { return req()==3 ? in(2) : NULL; }
virtual int Opcode() const;
virtual const Type *bottom_type() const { return TypeInt::INT; }
virtual Node *Identity( PhaseTransform *phase );
};
--- 547,568 ----
// Stops value-numbering, Ideal calls or Identity functions.
class Opaque1Node : public Node {
virtual uint hash() const ; // { return NO_HASH; }
virtual uint cmp( const Node &n ) const;
public:
! Opaque1Node( Compile* C, Node *n ) : Node(0,n) {
! // Put it on the Macro nodes list to removed during macro nodes expansion.
! init_flags(Flag_is_macro);
! C->add_macro_node(this);
! }
// Special version for the pre-loop to hold the original loop limit
// which is consumed by range check elimination.
! Opaque1Node( Compile* C, Node *n, Node* orig_limit ) : Node(0,n,orig_limit) {
! // Put it on the Macro nodes list to removed during macro nodes expansion.
! init_flags(Flag_is_macro);
! C->add_macro_node(this);
! }
Node* original_loop_limit() { return req()==3 ? in(2) : NULL; }
virtual int Opcode() const;
virtual const Type *bottom_type() const { return TypeInt::INT; }
virtual Node *Identity( PhaseTransform *phase );
};
*** 523,533 ****
// it's OK to be slightly sloppy on optimizations here.
class Opaque2Node : public Node {
virtual uint hash() const ; // { return NO_HASH; }
virtual uint cmp( const Node &n ) const;
public:
! Opaque2Node( Node *n ) : Node(0,n) {}
virtual int Opcode() const;
virtual const Type *bottom_type() const { return TypeInt::INT; }
};
//----------------------PartialSubtypeCheckNode--------------------------------
--- 578,592 ----
// it's OK to be slightly sloppy on optimizations here.
class Opaque2Node : public Node {
virtual uint hash() const ; // { return NO_HASH; }
virtual uint cmp( const Node &n ) const;
public:
! Opaque2Node( Compile* C, Node *n ) : Node(0,n) {
! // Put it on the Macro nodes list to removed during macro nodes expansion.
! init_flags(Flag_is_macro);
! C->add_macro_node(this);
! }
virtual int Opcode() const;
virtual const Type *bottom_type() const { return TypeInt::INT; }
};
//----------------------PartialSubtypeCheckNode--------------------------------