mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
Merge
This commit is contained in:
commit
ca68a6b69f
44 changed files with 338 additions and 329 deletions
|
@ -52,7 +52,7 @@ uint AddNode::hash() const {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// If either input is a constant 0, return the other input.
|
||||
Node *AddNode::Identity( PhaseTransform *phase ) {
|
||||
Node* AddNode::Identity(PhaseGVN* phase) {
|
||||
const Type *zero = add_id(); // The additive identity
|
||||
if( phase->type( in(1) )->higher_equal( zero ) ) return in(2);
|
||||
if( phase->type( in(2) )->higher_equal( zero ) ) return in(1);
|
||||
|
@ -204,7 +204,7 @@ Node *AddNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
//------------------------------Value-----------------------------------------
|
||||
// An add node sums it's two _in. If one input is an RSD, we must mixin
|
||||
// the other input's symbols.
|
||||
const Type *AddNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* AddNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
|
@ -326,7 +326,7 @@ Node *AddINode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Fold (x-y)+y OR y+(x-y) into x
|
||||
Node *AddINode::Identity( PhaseTransform *phase ) {
|
||||
Node* AddINode::Identity(PhaseGVN* phase) {
|
||||
if( in(1)->Opcode() == Op_SubI && phase->eqv(in(1)->in(2),in(2)) ) {
|
||||
return in(1)->in(1);
|
||||
}
|
||||
|
@ -443,7 +443,7 @@ Node *AddLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Fold (x-y)+y OR y+(x-y) into x
|
||||
Node *AddLNode::Identity( PhaseTransform *phase ) {
|
||||
Node* AddLNode::Identity(PhaseGVN* phase) {
|
||||
if( in(1)->Opcode() == Op_SubL && phase->eqv(in(1)->in(2),in(2)) ) {
|
||||
return in(1)->in(1);
|
||||
}
|
||||
|
@ -561,7 +561,7 @@ Node *AddDNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
// If one input is a constant 0, return the other input.
|
||||
Node *AddPNode::Identity( PhaseTransform *phase ) {
|
||||
Node* AddPNode::Identity(PhaseGVN* phase) {
|
||||
return ( phase->type( in(Offset) )->higher_equal( TypeX_ZERO ) ) ? in(Address) : this;
|
||||
}
|
||||
|
||||
|
@ -659,7 +659,7 @@ const Type *AddPNode::bottom_type() const {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *AddPNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* AddPNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(Address) );
|
||||
const Type *t2 = phase->type( in(Offset) );
|
||||
|
@ -733,7 +733,7 @@ uint AddPNode::match_edge(uint idx) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *OrINode::Identity( PhaseTransform *phase ) {
|
||||
Node* OrINode::Identity(PhaseGVN* phase) {
|
||||
// x | x => x
|
||||
if (phase->eqv(in(1), in(2))) {
|
||||
return in(1);
|
||||
|
@ -774,7 +774,7 @@ const Type *OrINode::add_ring( const Type *t0, const Type *t1 ) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *OrLNode::Identity( PhaseTransform *phase ) {
|
||||
Node* OrLNode::Identity(PhaseGVN* phase) {
|
||||
// x | x => x
|
||||
if (phase->eqv(in(1), in(2))) {
|
||||
return in(1);
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
|
||||
// Handle algebraic identities here. If we have an identity, return the Node
|
||||
// we are equivalent to. We look for "add of zero" as an identity.
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
|
||||
// We also canonicalize the Node, moving constants to the right input,
|
||||
// and flatten expressions (so that 1+x+2 becomes x+3).
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
// Compute a new Type for this node. Basically we just do the pre-check,
|
||||
// then call the virtual add() to set the type.
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
|
||||
// Check if this addition involves the additive identity
|
||||
virtual const Type *add_of_identity( const Type *t1, const Type *t2 ) const;
|
||||
|
@ -80,7 +80,7 @@ public:
|
|||
virtual const Type *add_id() const { return TypeInt::ZERO; }
|
||||
virtual const Type *bottom_type() const { return TypeInt::INT; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
};
|
||||
|
||||
|
@ -94,7 +94,7 @@ public:
|
|||
virtual const Type *add_id() const { return TypeLong::ZERO; }
|
||||
virtual const Type *bottom_type() const { return TypeLong::LONG; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
};
|
||||
|
||||
|
@ -109,7 +109,7 @@ public:
|
|||
virtual const Type *add_ring( const Type *, const Type * ) const;
|
||||
virtual const Type *add_id() const { return TypeF::ZERO; }
|
||||
virtual const Type *bottom_type() const { return Type::FLOAT; }
|
||||
virtual Node *Identity( PhaseTransform *phase ) { return this; }
|
||||
virtual Node* Identity(PhaseGVN* phase) { return this; }
|
||||
virtual uint ideal_reg() const { return Op_RegF; }
|
||||
};
|
||||
|
||||
|
@ -124,7 +124,7 @@ public:
|
|||
virtual const Type *add_ring( const Type *, const Type * ) const;
|
||||
virtual const Type *add_id() const { return TypeD::ZERO; }
|
||||
virtual const Type *bottom_type() const { return Type::DOUBLE; }
|
||||
virtual Node *Identity( PhaseTransform *phase ) { return this; }
|
||||
virtual Node* Identity(PhaseGVN* phase) { return this; }
|
||||
virtual uint ideal_reg() const { return Op_RegD; }
|
||||
};
|
||||
|
||||
|
@ -142,9 +142,9 @@ public:
|
|||
init_class_id(Class_AddP);
|
||||
}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual const Type *bottom_type() const;
|
||||
virtual uint ideal_reg() const { return Op_RegP; }
|
||||
Node *base_node() { assert( req() > Base, "Missing base"); return in(Base); }
|
||||
|
@ -170,7 +170,7 @@ public:
|
|||
virtual const Type *add_ring( const Type *, const Type * ) const;
|
||||
virtual const Type *add_id() const { return TypeInt::ZERO; }
|
||||
virtual const Type *bottom_type() const { return TypeInt::INT; }
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
};
|
||||
|
||||
|
@ -184,7 +184,7 @@ public:
|
|||
virtual const Type *add_ring( const Type *, const Type * ) const;
|
||||
virtual const Type *add_id() const { return TypeLong::ZERO; }
|
||||
virtual const Type *bottom_type() const { return TypeLong::LONG; }
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
};
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ uint StartNode::size_of() const { return sizeof(*this); }
|
|||
uint StartNode::cmp( const Node &n ) const
|
||||
{ return _domain == ((StartNode&)n)._domain; }
|
||||
const Type *StartNode::bottom_type() const { return _domain; }
|
||||
const Type *StartNode::Value(PhaseTransform *phase) const { return _domain; }
|
||||
const Type* StartNode::Value(PhaseGVN* phase) const { return _domain; }
|
||||
#ifndef PRODUCT
|
||||
void StartNode::dump_spec(outputStream *st) const { st->print(" #"); _domain->dump_on(st);}
|
||||
void StartNode::dump_compact_spec(outputStream *st) const { /* empty */ }
|
||||
|
@ -173,7 +173,7 @@ Node *ReturnNode::Ideal(PhaseGVN *phase, bool can_reshape){
|
|||
return remove_dead_region(phase, can_reshape) ? this : NULL;
|
||||
}
|
||||
|
||||
const Type *ReturnNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ReturnNode::Value(PhaseGVN* phase) const {
|
||||
return ( phase->type(in(TypeFunc::Control)) == Type::TOP)
|
||||
? Type::TOP
|
||||
: Type::BOTTOM;
|
||||
|
@ -218,7 +218,7 @@ Node *RethrowNode::Ideal(PhaseGVN *phase, bool can_reshape){
|
|||
return remove_dead_region(phase, can_reshape) ? this : NULL;
|
||||
}
|
||||
|
||||
const Type *RethrowNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* RethrowNode::Value(PhaseGVN* phase) const {
|
||||
return (phase->type(in(TypeFunc::Control)) == Type::TOP)
|
||||
? Type::TOP
|
||||
: Type::BOTTOM;
|
||||
|
@ -685,7 +685,7 @@ void CallNode::dump_spec(outputStream *st) const {
|
|||
#endif
|
||||
|
||||
const Type *CallNode::bottom_type() const { return tf()->range(); }
|
||||
const Type *CallNode::Value(PhaseTransform *phase) const {
|
||||
const Type* CallNode::Value(PhaseGVN* phase) const {
|
||||
if (phase->type(in(0)) == Type::TOP) return Type::TOP;
|
||||
return tf()->range();
|
||||
}
|
||||
|
@ -1133,7 +1133,7 @@ Node *SafePointNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Remove obviously duplicate safepoints
|
||||
Node *SafePointNode::Identity( PhaseTransform *phase ) {
|
||||
Node* SafePointNode::Identity(PhaseGVN* phase) {
|
||||
|
||||
// If you have back to back safepoints, remove one
|
||||
if( in(TypeFunc::Control)->is_SafePoint() )
|
||||
|
@ -1156,7 +1156,7 @@ Node *SafePointNode::Identity( PhaseTransform *phase ) {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *SafePointNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* SafePointNode::Value(PhaseGVN* phase) const {
|
||||
if( phase->type(in(0)) == Type::TOP ) return Type::TOP;
|
||||
if( phase->eqv( in(0), this ) ) return Type::TOP; // Dead infinite loop
|
||||
return Type::CONTROL;
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
virtual bool pinned() const { return true; };
|
||||
virtual const Type *bottom_type() const;
|
||||
virtual const TypePtr *adr_type() const { return TypePtr::BOTTOM; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual void calling_convention( BasicType* sig_bt, VMRegPair *parm_reg, uint length ) const;
|
||||
virtual const RegMask &in_RegMask(uint) const;
|
||||
|
@ -127,7 +127,7 @@ public:
|
|||
virtual uint hash() const { return NO_HASH; } // CFG nodes do not hash
|
||||
virtual bool depends_only_on_test() const { return false; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual uint ideal_reg() const { return NotAMachineReg; }
|
||||
virtual uint match_edge(uint idx) const;
|
||||
#ifndef PRODUCT
|
||||
|
@ -148,7 +148,7 @@ class RethrowNode : public Node {
|
|||
virtual uint hash() const { return NO_HASH; } // CFG nodes do not hash
|
||||
virtual bool depends_only_on_test() const { return false; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual uint match_edge(uint idx) const;
|
||||
virtual uint ideal_reg() const { return NotAMachineReg; }
|
||||
#ifndef PRODUCT
|
||||
|
@ -465,11 +465,11 @@ public:
|
|||
// Standard Node stuff
|
||||
virtual int Opcode() const;
|
||||
virtual bool pinned() const { return true; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual const Type *bottom_type() const { return Type::CONTROL; }
|
||||
virtual const TypePtr *adr_type() const { return _adr_type; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual uint ideal_reg() const { return 0; }
|
||||
virtual const RegMask &in_RegMask(uint) const;
|
||||
virtual const RegMask &out_RegMask() const;
|
||||
|
@ -593,9 +593,9 @@ public:
|
|||
void set_generator(CallGenerator* cg) { _generator = cg; }
|
||||
|
||||
virtual const Type *bottom_type() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual Node *Identity( PhaseTransform *phase ) { return this; }
|
||||
virtual Node* Identity(PhaseGVN* phase) { return this; }
|
||||
virtual uint cmp( const Node &n ) const;
|
||||
virtual uint size_of() const = 0;
|
||||
virtual void calling_convention( BasicType* sig_bt, VMRegPair *parm_regs, uint argcnt ) const;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
//=============================================================================
|
||||
// If input is already higher or equal to cast type, then this is an identity.
|
||||
Node *ConstraintCastNode::Identity(PhaseTransform *phase) {
|
||||
Node* ConstraintCastNode::Identity(PhaseGVN* phase) {
|
||||
Node* dom = dominating_cast(phase);
|
||||
if (dom != NULL) {
|
||||
assert(_carry_dependency, "only for casts that carry a dependency");
|
||||
|
@ -48,7 +48,7 @@ Node *ConstraintCastNode::Identity(PhaseTransform *phase) {
|
|||
|
||||
//------------------------------Value------------------------------------------
|
||||
// Take 'join' of input and cast-up type
|
||||
const Type *ConstraintCastNode::Value(PhaseTransform *phase) const {
|
||||
const Type* ConstraintCastNode::Value(PhaseGVN* phase) const {
|
||||
if (in(0) && phase->type(in(0)) == Type::TOP) return Type::TOP;
|
||||
const Type* ft = phase->type(in(1))->filter_speculative(_type);
|
||||
|
||||
|
@ -149,7 +149,7 @@ void ConstraintCastNode::dump_spec(outputStream *st) const {
|
|||
}
|
||||
#endif
|
||||
|
||||
const Type *CastIINode::Value(PhaseTransform *phase) const {
|
||||
const Type* CastIINode::Value(PhaseGVN* phase) const {
|
||||
const Type *res = ConstraintCastNode::Value(phase);
|
||||
|
||||
// Try to improve the type of the CastII if we recognize a CmpI/If
|
||||
|
@ -280,7 +280,7 @@ Node *CastIINode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
// If input is already higher or equal to cast type, then this is an identity.
|
||||
Node *CheckCastPPNode::Identity( PhaseTransform *phase ) {
|
||||
Node* CheckCastPPNode::Identity(PhaseGVN* phase) {
|
||||
Node* dom = dominating_cast(phase);
|
||||
if (dom != NULL) {
|
||||
assert(_carry_dependency, "only for casts that carry a dependency");
|
||||
|
@ -296,7 +296,7 @@ Node *CheckCastPPNode::Identity( PhaseTransform *phase ) {
|
|||
|
||||
//------------------------------Value------------------------------------------
|
||||
// Take 'join' of input and cast-up type, unless working with an Interface
|
||||
const Type *CheckCastPPNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* CheckCastPPNode::Value(PhaseGVN* phase) const {
|
||||
if( in(0) && phase->type(in(0)) == Type::TOP ) return Type::TOP;
|
||||
|
||||
const Type *inn = phase->type(in(1));
|
||||
|
@ -379,7 +379,7 @@ const Type *CheckCastPPNode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *CastX2PNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* CastX2PNode::Value(PhaseGVN* phase) const {
|
||||
const Type* t = phase->type(in(1));
|
||||
if (t == Type::TOP) return Type::TOP;
|
||||
if (t->base() == Type_X && t->singleton()) {
|
||||
|
@ -443,14 +443,14 @@ Node *CastX2PNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
}
|
||||
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *CastX2PNode::Identity( PhaseTransform *phase ) {
|
||||
Node* CastX2PNode::Identity(PhaseGVN* phase) {
|
||||
if (in(1)->Opcode() == Op_CastP2X) return in(1)->in(1);
|
||||
return this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *CastP2XNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* CastP2XNode::Value(PhaseGVN* phase) const {
|
||||
const Type* t = phase->type(in(1));
|
||||
if (t == Type::TOP) return Type::TOP;
|
||||
if (t->base() == Type::RawPtr && t->singleton()) {
|
||||
|
@ -465,7 +465,7 @@ Node *CastP2XNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
}
|
||||
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *CastP2XNode::Identity( PhaseTransform *phase ) {
|
||||
Node* CastP2XNode::Identity(PhaseGVN* phase) {
|
||||
if (in(1)->Opcode() == Op_CastX2P) return in(1)->in(1);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -44,8 +44,8 @@ class ConstraintCastNode: public TypeNode {
|
|||
init_class_id(Class_ConstraintCast);
|
||||
init_req(1, n);
|
||||
}
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual int Opcode() const;
|
||||
virtual uint ideal_reg() const = 0;
|
||||
|
@ -67,7 +67,7 @@ class CastIINode: public ConstraintCastNode {
|
|||
: ConstraintCastNode(n, t, carry_dependency) {}
|
||||
virtual int Opcode() const;
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
};
|
||||
|
||||
|
@ -92,8 +92,8 @@ class CheckCastPPNode: public ConstraintCastNode {
|
|||
init_req(0, c);
|
||||
}
|
||||
|
||||
virtual Node *Identity(PhaseTransform *phase);
|
||||
virtual const Type *Value(PhaseTransform *phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual int Opcode() const;
|
||||
virtual uint ideal_reg() const { return Op_RegP; }
|
||||
};
|
||||
|
@ -105,9 +105,9 @@ class CastX2PNode : public Node {
|
|||
public:
|
||||
CastX2PNode( Node *n ) : Node(NULL, n) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual uint ideal_reg() const { return Op_RegP; }
|
||||
virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; }
|
||||
};
|
||||
|
@ -119,9 +119,9 @@ class CastP2XNode : public Node {
|
|||
public:
|
||||
CastP2XNode( Node *ctrl, Node *n ) : Node(ctrl, n) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual uint ideal_reg() const { return Op_RegX; }
|
||||
virtual const Type *bottom_type() const { return TypeX_X; }
|
||||
// Return false to keep node from moving away from an associated card mark.
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
// Compute the type of the RegionNode.
|
||||
const Type *RegionNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* RegionNode::Value(PhaseGVN* phase) const {
|
||||
for( uint i=1; i<req(); ++i ) { // For all paths in
|
||||
Node *n = in(i); // Get Control source
|
||||
if( !n ) continue; // Missing inputs are TOP
|
||||
|
@ -60,7 +60,7 @@ const Type *RegionNode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Check for Region being Identity.
|
||||
Node *RegionNode::Identity( PhaseTransform *phase ) {
|
||||
Node* RegionNode::Identity(PhaseGVN* phase) {
|
||||
// Cannot have Region be an identity, even if it has only 1 input.
|
||||
// Phi users cannot have their Region input folded away for them,
|
||||
// since they need to select the proper data input
|
||||
|
@ -892,7 +892,7 @@ void PhiNode::verify_adr_type(bool recursive) const {
|
|||
|
||||
//------------------------------Value------------------------------------------
|
||||
// Compute the type of the PhiNode
|
||||
const Type *PhiNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* PhiNode::Value(PhaseGVN* phase) const {
|
||||
Node *r = in(0); // RegionNode
|
||||
if( !r ) // Copy or dead
|
||||
return in(1) ? phase->type(in(1)) : Type::TOP;
|
||||
|
@ -1145,7 +1145,7 @@ Node* PhiNode::is_cmove_id(PhaseTransform* phase, int true_path) {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Check for Region being Identity.
|
||||
Node *PhiNode::Identity( PhaseTransform *phase ) {
|
||||
Node* PhiNode::Identity(PhaseGVN* phase) {
|
||||
// Check for no merging going on
|
||||
// (There used to be special-case code here when this->region->is_Loop.
|
||||
// It would check for a tributary phi on the backedge that the main phi
|
||||
|
@ -2069,13 +2069,13 @@ void PhiNode::dump_spec(outputStream *st) const {
|
|||
|
||||
|
||||
//=============================================================================
|
||||
const Type *GotoNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* GotoNode::Value(PhaseGVN* phase) const {
|
||||
// If the input is reachable, then we are executed.
|
||||
// If the input is not reachable, then we are not executed.
|
||||
return phase->type(in(0));
|
||||
}
|
||||
|
||||
Node *GotoNode::Identity( PhaseTransform *phase ) {
|
||||
Node* GotoNode::Identity(PhaseGVN* phase) {
|
||||
return in(0); // Simple copy of incoming control
|
||||
}
|
||||
|
||||
|
@ -2137,7 +2137,7 @@ const Type *PCTableNode::bottom_type() const {
|
|||
//------------------------------Value------------------------------------------
|
||||
// Compute the type of the PCTableNode. If reachable it is a tuple of
|
||||
// Control, otherwise the table targets are not reachable
|
||||
const Type *PCTableNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* PCTableNode::Value(PhaseGVN* phase) const {
|
||||
if( phase->type(in(0)) == Type::CONTROL )
|
||||
return bottom_type();
|
||||
return Type::TOP; // All paths dead? Then so are we
|
||||
|
@ -2182,7 +2182,7 @@ void JumpProjNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *o
|
|||
//------------------------------Value------------------------------------------
|
||||
// Check for being unreachable, or for coming from a Rethrow. Rethrow's cannot
|
||||
// have the default "fall_through_index" path.
|
||||
const Type *CatchNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* CatchNode::Value(PhaseGVN* phase) const {
|
||||
// Unreachable? Then so are all paths from here.
|
||||
if( phase->type(in(0)) == Type::TOP ) return Type::TOP;
|
||||
// First assume all paths are reachable
|
||||
|
@ -2226,7 +2226,7 @@ uint CatchProjNode::cmp( const Node &n ) const {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// If only 1 target is possible, choose it if it is the main control
|
||||
Node *CatchProjNode::Identity( PhaseTransform *phase ) {
|
||||
Node* CatchProjNode::Identity(PhaseGVN* phase) {
|
||||
// If my value is control and no other value is, then treat as ID
|
||||
const TypeTuple *t = phase->type(in(0))->is_tuple();
|
||||
if (t->field_at(_con) != Type::CONTROL) return this;
|
||||
|
@ -2269,7 +2269,7 @@ void CatchProjNode::dump_spec(outputStream *st) const {
|
|||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Check for CreateEx being Identity.
|
||||
Node *CreateExNode::Identity( PhaseTransform *phase ) {
|
||||
Node* CreateExNode::Identity(PhaseGVN* phase) {
|
||||
if( phase->type(in(1)) == Type::TOP ) return in(1);
|
||||
if( phase->type(in(0)) == Type::TOP ) return in(0);
|
||||
// We only come from CatchProj, unless the CatchProj goes away.
|
||||
|
@ -2285,7 +2285,7 @@ Node *CreateExNode::Identity( PhaseTransform *phase ) {
|
|||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
// Check for being unreachable.
|
||||
const Type *NeverBranchNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* NeverBranchNode::Value(PhaseGVN* phase) const {
|
||||
if (!in(0) || in(0)->is_top()) return Type::TOP;
|
||||
return bottom_type();
|
||||
}
|
||||
|
|
|
@ -91,8 +91,8 @@ public:
|
|||
virtual uint hash() const { return NO_HASH; } // CFG nodes do not hash
|
||||
virtual bool depends_only_on_test() const { return false; }
|
||||
virtual const Type *bottom_type() const { return Type::CONTROL; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const RegMask &out_RegMask() const;
|
||||
bool try_clean_mem_phi(PhaseGVN *phase);
|
||||
|
@ -205,8 +205,8 @@ public:
|
|||
type()->higher_equal(tp);
|
||||
}
|
||||
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const RegMask &out_RegMask() const;
|
||||
virtual const RegMask &in_RegMask(uint) const;
|
||||
|
@ -234,8 +234,8 @@ public:
|
|||
virtual const Node *is_block_proj() const { return this; }
|
||||
virtual bool depends_only_on_test() const { return false; }
|
||||
virtual const Type *bottom_type() const { return Type::CONTROL; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const RegMask &out_RegMask() const;
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
@ -384,7 +384,7 @@ public:
|
|||
virtual bool pinned() const { return true; }
|
||||
virtual const Type *bottom_type() const { return TypeTuple::IFBOTH; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual int required_outcnt() const { return 2; }
|
||||
virtual const RegMask &out_RegMask() const;
|
||||
Node* fold_compares(PhaseIterGVN* phase);
|
||||
|
@ -418,7 +418,7 @@ public:
|
|||
class IfProjNode : public CProjNode {
|
||||
public:
|
||||
IfProjNode(IfNode *ifnode, uint idx) : CProjNode(ifnode,idx) {}
|
||||
virtual Node *Identity(PhaseTransform *phase);
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
|
||||
protected:
|
||||
// Type of If input when this branch is always taken
|
||||
|
@ -472,7 +472,7 @@ public:
|
|||
init_req(1, idx);
|
||||
}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *bottom_type() const;
|
||||
virtual bool pinned() const { return true; }
|
||||
|
@ -532,7 +532,7 @@ public:
|
|||
init_class_id(Class_Catch);
|
||||
}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
// CatchProjNode controls which exception handler is targetted after a call.
|
||||
|
@ -560,7 +560,7 @@ public:
|
|||
}
|
||||
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type *bottom_type() const { return Type::CONTROL; }
|
||||
int handler_bci() const { return _handler_bci; }
|
||||
bool is_handler_proj() const { return _handler_bci >= 0; }
|
||||
|
@ -579,7 +579,7 @@ public:
|
|||
init_req(1, i_o);
|
||||
}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual bool pinned() const { return true; }
|
||||
uint match_edge(uint idx) const { return 0; }
|
||||
virtual uint ideal_reg() const { return Op_RegP; }
|
||||
|
@ -595,7 +595,7 @@ public:
|
|||
virtual int Opcode() const;
|
||||
virtual bool pinned() const { return true; };
|
||||
virtual const Type *bottom_type() const { return TypeTuple::IFBOTH; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual int required_outcnt() const { return 2; }
|
||||
virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { }
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *Conv2BNode::Identity( PhaseTransform *phase ) {
|
||||
Node* Conv2BNode::Identity(PhaseGVN* phase) {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return in(1);
|
||||
if( t == TypeInt::ZERO ) return in(1);
|
||||
|
@ -42,7 +42,7 @@ Node *Conv2BNode::Identity( PhaseTransform *phase ) {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *Conv2BNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* Conv2BNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
if( t == TypeInt::ZERO ) return TypeInt::ZERO;
|
||||
|
@ -64,7 +64,7 @@ const Type *Conv2BNode::Value( PhaseTransform *phase ) const {
|
|||
// The conversions operations are all Alpha sorted. Please keep it that way!
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ConvD2FNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ConvD2FNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
if( t == Type::DOUBLE ) return Type::FLOAT;
|
||||
|
@ -75,13 +75,13 @@ const Type *ConvD2FNode::Value( PhaseTransform *phase ) const {
|
|||
//------------------------------Identity---------------------------------------
|
||||
// Float's can be converted to doubles with no loss of bits. Hence
|
||||
// converting a float to a double and back to a float is a NOP.
|
||||
Node *ConvD2FNode::Identity(PhaseTransform *phase) {
|
||||
Node* ConvD2FNode::Identity(PhaseGVN* phase) {
|
||||
return (in(1)->Opcode() == Op_ConvF2D) ? in(1)->in(1) : this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ConvD2INode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ConvD2INode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
if( t == Type::DOUBLE ) return TypeInt::INT;
|
||||
|
@ -100,13 +100,13 @@ Node *ConvD2INode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
//------------------------------Identity---------------------------------------
|
||||
// Int's can be converted to doubles with no loss of bits. Hence
|
||||
// converting an integer to a double and back to an integer is a NOP.
|
||||
Node *ConvD2INode::Identity(PhaseTransform *phase) {
|
||||
Node* ConvD2INode::Identity(PhaseGVN* phase) {
|
||||
return (in(1)->Opcode() == Op_ConvI2D) ? in(1)->in(1) : this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ConvD2LNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ConvD2LNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
if( t == Type::DOUBLE ) return TypeLong::LONG;
|
||||
|
@ -115,7 +115,7 @@ const Type *ConvD2LNode::Value( PhaseTransform *phase ) const {
|
|||
}
|
||||
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *ConvD2LNode::Identity(PhaseTransform *phase) {
|
||||
Node* ConvD2LNode::Identity(PhaseGVN* phase) {
|
||||
// Remove ConvD2L->ConvL2D->ConvD2L sequences.
|
||||
if( in(1) ->Opcode() == Op_ConvL2D &&
|
||||
in(1)->in(1)->Opcode() == Op_ConvD2L )
|
||||
|
@ -133,7 +133,7 @@ Node *ConvD2LNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ConvF2DNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ConvF2DNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
if( t == Type::FLOAT ) return Type::DOUBLE;
|
||||
|
@ -143,7 +143,7 @@ const Type *ConvF2DNode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ConvF2INode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ConvF2INode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
if( t == Type::FLOAT ) return TypeInt::INT;
|
||||
|
@ -152,7 +152,7 @@ const Type *ConvF2INode::Value( PhaseTransform *phase ) const {
|
|||
}
|
||||
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *ConvF2INode::Identity(PhaseTransform *phase) {
|
||||
Node* ConvF2INode::Identity(PhaseGVN* phase) {
|
||||
// Remove ConvF2I->ConvI2F->ConvF2I sequences.
|
||||
if( in(1) ->Opcode() == Op_ConvI2F &&
|
||||
in(1)->in(1)->Opcode() == Op_ConvF2I )
|
||||
|
@ -170,7 +170,7 @@ Node *ConvF2INode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ConvF2LNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ConvF2LNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
if( t == Type::FLOAT ) return TypeLong::LONG;
|
||||
|
@ -179,7 +179,7 @@ const Type *ConvF2LNode::Value( PhaseTransform *phase ) const {
|
|||
}
|
||||
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *ConvF2LNode::Identity(PhaseTransform *phase) {
|
||||
Node* ConvF2LNode::Identity(PhaseGVN* phase) {
|
||||
// Remove ConvF2L->ConvL2F->ConvF2L sequences.
|
||||
if( in(1) ->Opcode() == Op_ConvL2F &&
|
||||
in(1)->in(1)->Opcode() == Op_ConvF2L )
|
||||
|
@ -197,7 +197,7 @@ Node *ConvF2LNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ConvI2DNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ConvI2DNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
const TypeInt *ti = t->is_int();
|
||||
|
@ -207,7 +207,7 @@ const Type *ConvI2DNode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ConvI2FNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ConvI2FNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
const TypeInt *ti = t->is_int();
|
||||
|
@ -216,7 +216,7 @@ const Type *ConvI2FNode::Value( PhaseTransform *phase ) const {
|
|||
}
|
||||
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *ConvI2FNode::Identity(PhaseTransform *phase) {
|
||||
Node* ConvI2FNode::Identity(PhaseGVN* phase) {
|
||||
// Remove ConvI2F->ConvF2I->ConvI2F sequences.
|
||||
if( in(1) ->Opcode() == Op_ConvF2I &&
|
||||
in(1)->in(1)->Opcode() == Op_ConvI2F )
|
||||
|
@ -226,7 +226,7 @@ Node *ConvI2FNode::Identity(PhaseTransform *phase) {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ConvI2LNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ConvI2LNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
const TypeInt *ti = t->is_int();
|
||||
|
@ -390,7 +390,7 @@ Node *ConvI2LNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ConvL2DNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ConvL2DNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
const TypeLong *tl = t->is_long();
|
||||
|
@ -400,7 +400,7 @@ const Type *ConvL2DNode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ConvL2FNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ConvL2FNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
const TypeLong *tl = t->is_long();
|
||||
|
@ -410,14 +410,14 @@ const Type *ConvL2FNode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//----------------------------Identity-----------------------------------------
|
||||
Node *ConvL2INode::Identity( PhaseTransform *phase ) {
|
||||
Node* ConvL2INode::Identity(PhaseGVN* phase) {
|
||||
// Convert L2I(I2L(x)) => x
|
||||
if (in(1)->Opcode() == Op_ConvI2L) return in(1)->in(1);
|
||||
return this;
|
||||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ConvL2INode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ConvL2INode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
const TypeLong *tl = t->is_long();
|
||||
|
@ -469,7 +469,7 @@ Node *ConvL2INode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Remove redundant roundings
|
||||
Node *RoundFloatNode::Identity( PhaseTransform *phase ) {
|
||||
Node* RoundFloatNode::Identity(PhaseGVN* phase) {
|
||||
assert(Matcher::strict_fp_requires_explicit_rounding, "should only generate for Intel");
|
||||
// Do not round constants
|
||||
if (phase->type(in(1))->base() == Type::FloatCon) return in(1);
|
||||
|
@ -483,14 +483,14 @@ Node *RoundFloatNode::Identity( PhaseTransform *phase ) {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *RoundFloatNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* RoundFloatNode::Value(PhaseGVN* phase) const {
|
||||
return phase->type( in(1) );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Remove redundant roundings. Incoming arguments are already rounded.
|
||||
Node *RoundDoubleNode::Identity( PhaseTransform *phase ) {
|
||||
Node* RoundDoubleNode::Identity(PhaseGVN* phase) {
|
||||
assert(Matcher::strict_fp_requires_explicit_rounding, "should only generate for Intel");
|
||||
// Do not round constants
|
||||
if (phase->type(in(1))->base() == Type::DoubleCon) return in(1);
|
||||
|
@ -506,7 +506,7 @@ Node *RoundDoubleNode::Identity( PhaseTransform *phase ) {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *RoundDoubleNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* RoundDoubleNode::Value(PhaseGVN* phase) const {
|
||||
return phase->type( in(1) );
|
||||
}
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ class Conv2BNode : public Node {
|
|||
Conv2BNode( Node *i ) : Node(0,i) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return TypeInt::BOOL; }
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
};
|
||||
|
||||
|
@ -49,8 +49,8 @@ class ConvD2FNode : public Node {
|
|||
ConvD2FNode( Node *in1 ) : Node(0,in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return Type::FLOAT; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual uint ideal_reg() const { return Op_RegF; }
|
||||
};
|
||||
|
||||
|
@ -61,8 +61,8 @@ class ConvD2INode : public Node {
|
|||
ConvD2INode( Node *in1 ) : Node(0,in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return TypeInt::INT; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
};
|
||||
|
@ -74,8 +74,8 @@ class ConvD2LNode : public Node {
|
|||
ConvD2LNode( Node *dbl ) : Node(0,dbl) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return TypeLong::LONG; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
};
|
||||
|
@ -87,7 +87,7 @@ class ConvF2DNode : public Node {
|
|||
ConvF2DNode( Node *in1 ) : Node(0,in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return Type::DOUBLE; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual uint ideal_reg() const { return Op_RegD; }
|
||||
};
|
||||
|
||||
|
@ -98,8 +98,8 @@ class ConvF2INode : public Node {
|
|||
ConvF2INode( Node *in1 ) : Node(0,in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return TypeInt::INT; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
};
|
||||
|
@ -111,8 +111,8 @@ class ConvF2LNode : public Node {
|
|||
ConvF2LNode( Node *in1 ) : Node(0,in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return TypeLong::LONG; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
};
|
||||
|
@ -124,7 +124,7 @@ class ConvI2DNode : public Node {
|
|||
ConvI2DNode( Node *in1 ) : Node(0,in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return Type::DOUBLE; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual uint ideal_reg() const { return Op_RegD; }
|
||||
};
|
||||
|
||||
|
@ -135,8 +135,8 @@ class ConvI2FNode : public Node {
|
|||
ConvI2FNode( Node *in1 ) : Node(0,in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return Type::FLOAT; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual uint ideal_reg() const { return Op_RegF; }
|
||||
};
|
||||
|
||||
|
@ -148,7 +148,7 @@ class ConvI2LNode : public TypeNode {
|
|||
: TypeNode(t, 2)
|
||||
{ init_req(1, in1); }
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
};
|
||||
|
@ -160,7 +160,7 @@ class ConvL2DNode : public Node {
|
|||
ConvL2DNode( Node *in1 ) : Node(0,in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return Type::DOUBLE; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual uint ideal_reg() const { return Op_RegD; }
|
||||
};
|
||||
|
||||
|
@ -171,7 +171,7 @@ class ConvL2FNode : public Node {
|
|||
ConvL2FNode( Node *in1 ) : Node(0,in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return Type::FLOAT; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual uint ideal_reg() const { return Op_RegF; }
|
||||
};
|
||||
|
||||
|
@ -182,8 +182,8 @@ class ConvL2INode : public Node {
|
|||
ConvL2INode( Node *in1 ) : Node(0,in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return TypeInt::INT; }
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
};
|
||||
|
@ -195,8 +195,8 @@ class RoundFloatNode: public Node {
|
|||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return Type::FLOAT; }
|
||||
virtual uint ideal_reg() const { return Op_RegF; }
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
|
||||
|
@ -207,8 +207,8 @@ class RoundDoubleNode: public Node {
|
|||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return Type::DOUBLE; }
|
||||
virtual uint ideal_reg() const { return Op_RegD; }
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "opto/type.hpp"
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type* CountLeadingZerosINode::Value(PhaseTransform* phase) const {
|
||||
const Type* CountLeadingZerosINode::Value(PhaseGVN* phase) const {
|
||||
const Type* t = phase->type(in(1));
|
||||
if (t == Type::TOP) return Type::TOP;
|
||||
const TypeInt* ti = t->isa_int();
|
||||
|
@ -51,7 +51,7 @@ const Type* CountLeadingZerosINode::Value(PhaseTransform* phase) const {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type* CountLeadingZerosLNode::Value(PhaseTransform* phase) const {
|
||||
const Type* CountLeadingZerosLNode::Value(PhaseGVN* phase) const {
|
||||
const Type* t = phase->type(in(1));
|
||||
if (t == Type::TOP) return Type::TOP;
|
||||
const TypeLong* tl = t->isa_long();
|
||||
|
@ -74,7 +74,7 @@ const Type* CountLeadingZerosLNode::Value(PhaseTransform* phase) const {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type* CountTrailingZerosINode::Value(PhaseTransform* phase) const {
|
||||
const Type* CountTrailingZerosINode::Value(PhaseGVN* phase) const {
|
||||
const Type* t = phase->type(in(1));
|
||||
if (t == Type::TOP) return Type::TOP;
|
||||
const TypeInt* ti = t->isa_int();
|
||||
|
@ -96,7 +96,7 @@ const Type* CountTrailingZerosINode::Value(PhaseTransform* phase) const {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type* CountTrailingZerosLNode::Value(PhaseTransform* phase) const {
|
||||
const Type* CountTrailingZerosLNode::Value(PhaseGVN* phase) const {
|
||||
const Type* t = phase->type(in(1));
|
||||
if (t == Type::TOP) return Type::TOP;
|
||||
const TypeLong* tl = t->isa_long();
|
||||
|
|
|
@ -44,7 +44,7 @@ class CountLeadingZerosINode : public CountBitsNode {
|
|||
public:
|
||||
CountLeadingZerosINode(Node* in1) : CountBitsNode(in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type* Value(PhaseTransform* phase) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
//---------- CountLeadingZerosLNode --------------------------------------------
|
||||
|
@ -53,7 +53,7 @@ class CountLeadingZerosLNode : public CountBitsNode {
|
|||
public:
|
||||
CountLeadingZerosLNode(Node* in1) : CountBitsNode(in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type* Value(PhaseTransform* phase) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
//---------- CountTrailingZerosINode -------------------------------------------
|
||||
|
@ -62,7 +62,7 @@ class CountTrailingZerosINode : public CountBitsNode {
|
|||
public:
|
||||
CountTrailingZerosINode(Node* in1) : CountBitsNode(in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type* Value(PhaseTransform* phase) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
//---------- CountTrailingZerosLNode -------------------------------------------
|
||||
|
@ -71,7 +71,7 @@ class CountTrailingZerosLNode : public CountBitsNode {
|
|||
public:
|
||||
CountTrailingZerosLNode(Node* in1) : CountBitsNode(in1) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type* Value(PhaseTransform* phase) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
//---------- PopCountINode -----------------------------------------------------
|
||||
|
|
|
@ -457,7 +457,7 @@ static Node *transform_long_divide( PhaseGVN *phase, Node *dividend, jlong divis
|
|||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
// If the divisor is 1, we are an identity on the dividend.
|
||||
Node *DivINode::Identity( PhaseTransform *phase ) {
|
||||
Node* DivINode::Identity(PhaseGVN* phase) {
|
||||
return (phase->type( in(2) )->higher_equal(TypeInt::ONE)) ? in(1) : this;
|
||||
}
|
||||
|
||||
|
@ -493,7 +493,7 @@ Node *DivINode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
//------------------------------Value------------------------------------------
|
||||
// A DivINode divides its inputs. The third input is a Control input, used to
|
||||
// prevent hoisting the divide above an unsafe test.
|
||||
const Type *DivINode::Value( PhaseTransform *phase ) const {
|
||||
const Type* DivINode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
|
@ -559,7 +559,7 @@ const Type *DivINode::Value( PhaseTransform *phase ) const {
|
|||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
// If the divisor is 1, we are an identity on the dividend.
|
||||
Node *DivLNode::Identity( PhaseTransform *phase ) {
|
||||
Node* DivLNode::Identity(PhaseGVN* phase) {
|
||||
return (phase->type( in(2) )->higher_equal(TypeLong::ONE)) ? in(1) : this;
|
||||
}
|
||||
|
||||
|
@ -595,7 +595,7 @@ Node *DivLNode::Ideal( PhaseGVN *phase, bool can_reshape) {
|
|||
//------------------------------Value------------------------------------------
|
||||
// A DivLNode divides its inputs. The third input is a Control input, used to
|
||||
// prevent hoisting the divide above an unsafe test.
|
||||
const Type *DivLNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* DivLNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
|
@ -662,7 +662,7 @@ const Type *DivLNode::Value( PhaseTransform *phase ) const {
|
|||
//------------------------------Value------------------------------------------
|
||||
// An DivFNode divides its inputs. The third input is a Control input, used to
|
||||
// prevent hoisting the divide above an unsafe test.
|
||||
const Type *DivFNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* DivFNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
|
@ -705,7 +705,7 @@ const Type *DivFNode::Value( PhaseTransform *phase ) const {
|
|||
//------------------------------isA_Copy---------------------------------------
|
||||
// Dividing by self is 1.
|
||||
// If the divisor is 1, we are an identity on the dividend.
|
||||
Node *DivFNode::Identity( PhaseTransform *phase ) {
|
||||
Node* DivFNode::Identity(PhaseGVN* phase) {
|
||||
return (phase->type( in(2) ) == TypeF::ONE) ? in(1) : this;
|
||||
}
|
||||
|
||||
|
@ -750,7 +750,7 @@ Node *DivFNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
//------------------------------Value------------------------------------------
|
||||
// An DivDNode divides its inputs. The third input is a Control input, used to
|
||||
// prevent hoisting the divide above an unsafe test.
|
||||
const Type *DivDNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* DivDNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
|
@ -800,7 +800,7 @@ const Type *DivDNode::Value( PhaseTransform *phase ) const {
|
|||
//------------------------------isA_Copy---------------------------------------
|
||||
// Dividing by self is 1.
|
||||
// If the divisor is 1, we are an identity on the dividend.
|
||||
Node *DivDNode::Identity( PhaseTransform *phase ) {
|
||||
Node* DivDNode::Identity(PhaseGVN* phase) {
|
||||
return (phase->type( in(2) ) == TypeD::ONE) ? in(1) : this;
|
||||
}
|
||||
|
||||
|
@ -972,7 +972,7 @@ Node *ModINode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ModINode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ModINode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
|
@ -1145,7 +1145,7 @@ Node *ModLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ModLNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ModLNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
|
@ -1186,7 +1186,7 @@ const Type *ModLNode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ModFNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ModFNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
|
@ -1230,7 +1230,7 @@ const Type *ModFNode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ModDNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ModDNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
|
|
|
@ -44,9 +44,9 @@ class DivINode : public Node {
|
|||
public:
|
||||
DivINode( Node *c, Node *dividend, Node *divisor ) : Node(c, dividend, divisor ) {}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual const Type *bottom_type() const { return TypeInt::INT; }
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
};
|
||||
|
@ -57,9 +57,9 @@ class DivLNode : public Node {
|
|||
public:
|
||||
DivLNode( Node *c, Node *dividend, Node *divisor ) : Node(c, dividend, divisor ) {}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual const Type *bottom_type() const { return TypeLong::LONG; }
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
};
|
||||
|
@ -70,9 +70,9 @@ class DivFNode : public Node {
|
|||
public:
|
||||
DivFNode( Node *c, Node *dividend, Node *divisor ) : Node(c, dividend, divisor) {}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual const Type *bottom_type() const { return Type::FLOAT; }
|
||||
virtual uint ideal_reg() const { return Op_RegF; }
|
||||
};
|
||||
|
@ -83,9 +83,9 @@ class DivDNode : public Node {
|
|||
public:
|
||||
DivDNode( Node *c, Node *dividend, Node *divisor ) : Node(c,dividend, divisor) {}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual const Type *bottom_type() const { return Type::DOUBLE; }
|
||||
virtual uint ideal_reg() const { return Op_RegD; }
|
||||
};
|
||||
|
@ -96,7 +96,7 @@ class ModINode : public Node {
|
|||
public:
|
||||
ModINode( Node *c, Node *in1, Node *in2 ) : Node(c,in1, in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *bottom_type() const { return TypeInt::INT; }
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
|
@ -108,7 +108,7 @@ class ModLNode : public Node {
|
|||
public:
|
||||
ModLNode( Node *c, Node *in1, Node *in2 ) : Node(c,in1, in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *bottom_type() const { return TypeLong::LONG; }
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
|
@ -120,7 +120,7 @@ class ModFNode : public Node {
|
|||
public:
|
||||
ModFNode( Node *c, Node *in1, Node *in2 ) : Node(c,in1, in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual const Type *bottom_type() const { return Type::FLOAT; }
|
||||
virtual uint ideal_reg() const { return Op_RegF; }
|
||||
};
|
||||
|
@ -131,7 +131,7 @@ class ModDNode : public Node {
|
|||
public:
|
||||
ModDNode( Node *c, Node *in1, Node *in2 ) : Node(c, in1, in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual const Type *bottom_type() const { return Type::DOUBLE; }
|
||||
virtual uint ideal_reg() const { return Op_RegD; }
|
||||
};
|
||||
|
@ -147,9 +147,9 @@ public:
|
|||
mod_proj_num = 1 // remainder
|
||||
};
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase ) { return this; }
|
||||
virtual Node* Identity(PhaseGVN* phase) { return this; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape) { return NULL; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const { return bottom_type(); }
|
||||
virtual const Type* Value(PhaseGVN* phase) const { return bottom_type(); }
|
||||
virtual uint hash() const { return Node::hash(); }
|
||||
virtual bool is_CFG() const { return false; }
|
||||
virtual uint ideal_reg() const { return NotAMachineReg; }
|
||||
|
|
|
@ -45,7 +45,7 @@ extern int explicit_null_checks_elided;
|
|||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
// Return a tuple for whichever arm of the IF is reachable
|
||||
const Type *IfNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* IfNode::Value(PhaseGVN* phase) const {
|
||||
if( !in(0) ) return Type::TOP;
|
||||
if( phase->type(in(0)) == Type::TOP )
|
||||
return Type::TOP;
|
||||
|
@ -1527,16 +1527,19 @@ Node* IfNode::search_identical(int dist) {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// If the test is constant & we match, then we are the input Control
|
||||
Node *IfProjNode::Identity(PhaseTransform *phase) {
|
||||
Node* IfProjNode::Identity(PhaseGVN* phase) {
|
||||
// Can only optimize if cannot go the other way
|
||||
const TypeTuple *t = phase->type(in(0))->is_tuple();
|
||||
if (t == TypeTuple::IFNEITHER ||
|
||||
// kill dead branch first otherwise the IfNode's control will
|
||||
// have 2 control uses (the IfNode that doesn't go away because
|
||||
// it still has uses and this branch of the
|
||||
// If). Node::has_special_unique_user() will cause this node to
|
||||
// be reprocessed once the dead branch is killed.
|
||||
(always_taken(t) && in(0)->outcnt() == 1)) {
|
||||
if (t == TypeTuple::IFNEITHER || (always_taken(t) &&
|
||||
// During parsing (GVN) we don't remove dead code aggressively.
|
||||
// Cut off dead branch and let PhaseRemoveUseless take care of it.
|
||||
(!phase->is_IterGVN() ||
|
||||
// During IGVN, first wait for the dead branch to be killed.
|
||||
// Otherwise, the IfNode's control will have two control uses (the IfNode
|
||||
// that doesn't go away because it still has uses and this branch of the
|
||||
// If) which breaks other optimizations. Node::has_special_unique_user()
|
||||
// will cause this node to be reprocessed once the dead branch is killed.
|
||||
in(0)->outcnt() == 1))) {
|
||||
// IfNode control
|
||||
return in(0)->in(0);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ Node* StrIntrinsicNode::Ideal(PhaseGVN* phase, bool can_reshape) {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type* StrIntrinsicNode::Value(PhaseTransform* phase) const {
|
||||
const Type* StrIntrinsicNode::Value(PhaseGVN* phase) const {
|
||||
if (in(0) && phase->type(in(0)) == Type::TOP) return Type::TOP;
|
||||
return bottom_type();
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ Node* EncodeISOArrayNode::Ideal(PhaseGVN* phase, bool can_reshape) {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type* EncodeISOArrayNode::Value(PhaseTransform* phase) const {
|
||||
const Type* EncodeISOArrayNode::Value(PhaseGVN* phase) const {
|
||||
if (in(0) && phase->type(in(0)) == Type::TOP) return Type::TOP;
|
||||
return bottom_type();
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ class StrIntrinsicNode: public Node {
|
|||
virtual uint match_edge(uint idx) const;
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
|
||||
virtual const Type* Value(PhaseTransform* phase) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
ArgEncoding encoding() const { return _encoding; }
|
||||
};
|
||||
|
||||
|
@ -177,7 +177,7 @@ class EncodeISOArrayNode: public Node {
|
|||
virtual uint match_edge(uint idx) const;
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
|
||||
virtual const Type* Value(PhaseTransform* phase) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_OPTO_INTRINSICNODE_HPP
|
||||
|
|
|
@ -96,7 +96,7 @@ public:
|
|||
virtual uint size_of() const;
|
||||
virtual uint cmp( const Node &n ) const ; // Always fail, except on self
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const { return TypeInt::CC; }
|
||||
virtual const Type* Value(PhaseGVN* phase) const { return TypeInt::CC; }
|
||||
const Type *sub(const Type *t1, const Type *t2) const { return TypeInt::CC;}
|
||||
|
||||
void create_lock_counter(JVMState* s);
|
||||
|
@ -123,7 +123,7 @@ public:
|
|||
virtual uint hash() const ; // { return NO_HASH; }
|
||||
virtual uint cmp( const Node &n ) const ; // Always fail, except on self
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const { return TypeInt::CC; }
|
||||
virtual const Type* Value(PhaseGVN* phase) const { return TypeInt::CC; }
|
||||
const Type *sub(const Type *t1, const Type *t2) const { return TypeInt::CC;}
|
||||
|
||||
};
|
||||
|
|
|
@ -902,7 +902,7 @@ int CountedLoopEndNode::stride_con() const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value-----------------------------------------
|
||||
const Type *LoopLimitNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* LoopLimitNode::Value(PhaseGVN* phase) const {
|
||||
const Type* init_t = phase->type(in(Init));
|
||||
const Type* limit_t = phase->type(in(Limit));
|
||||
const Type* stride_t = phase->type(in(Stride));
|
||||
|
@ -1016,7 +1016,7 @@ Node *LoopLimitNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// If stride == 1 return limit node.
|
||||
Node *LoopLimitNode::Identity( PhaseTransform *phase ) {
|
||||
Node* LoopLimitNode::Identity(PhaseGVN* phase) {
|
||||
int stride_con = phase->type(in(Stride))->is_int()->get_con();
|
||||
if (stride_con == 1 || stride_con == -1)
|
||||
return in(Limit);
|
||||
|
|
|
@ -339,9 +339,9 @@ class LoopLimitNode : public Node {
|
|||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return TypeInt::INT; }
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
};
|
||||
|
||||
// -----------------------------IdealLoopTree----------------------------------
|
||||
|
|
|
@ -652,7 +652,7 @@ const RegMask &MachSafePointNode::in_RegMask( uint idx ) const {
|
|||
uint MachCallNode::cmp( const Node &n ) const
|
||||
{ return _tf == ((MachCallNode&)n)._tf; }
|
||||
const Type *MachCallNode::bottom_type() const { return tf()->range(); }
|
||||
const Type *MachCallNode::Value(PhaseTransform *phase) const { return tf()->range(); }
|
||||
const Type* MachCallNode::Value(PhaseGVN* phase) const { return tf()->range(); }
|
||||
|
||||
#ifndef PRODUCT
|
||||
void MachCallNode::dump_spec(outputStream *st) const {
|
||||
|
|
|
@ -863,7 +863,7 @@ public:
|
|||
|
||||
virtual const Type *bottom_type() const;
|
||||
virtual bool pinned() const { return false; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual const RegMask &in_RegMask(uint) const;
|
||||
virtual int ret_addr_offset() { return 0; }
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ void PhaseMacroExpand::eliminate_card_mark(Node* p2x) {
|
|||
} else {
|
||||
// G1 pre/post barriers
|
||||
assert(p2x->outcnt() <= 2, "expects 1 or 2 users: Xor and URShift nodes");
|
||||
// It could be only one user, URShift node, in Object.clone() instrinsic
|
||||
// It could be only one user, URShift node, in Object.clone() intrinsic
|
||||
// but the new allocation is passed to arraycopy stub and it could not
|
||||
// be scalar replaced. So we don't check the case.
|
||||
|
||||
|
|
|
@ -247,11 +247,11 @@ Node* OverflowLNode::Ideal(PhaseGVN* phase, bool can_reshape) {
|
|||
return IdealHelper<OverflowLNode>::Ideal(this, phase, can_reshape);
|
||||
}
|
||||
|
||||
const Type* OverflowINode::Value(PhaseTransform* phase) const {
|
||||
const Type* OverflowINode::Value(PhaseGVN* phase) const {
|
||||
return IdealHelper<OverflowINode>::Value(this, phase);
|
||||
}
|
||||
|
||||
const Type* OverflowLNode::Value(PhaseTransform* phase) const {
|
||||
const Type* OverflowLNode::Value(PhaseGVN* phase) const {
|
||||
return IdealHelper<OverflowLNode>::Value(this, phase);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
OverflowINode(Node* in1, Node* in2) : OverflowNode(in1, in2) {}
|
||||
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
|
||||
virtual const Type* Value(PhaseTransform* phase) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
|
||||
virtual bool will_overflow(jint v1, jint v2) const = 0;
|
||||
virtual bool can_overflow(const Type* t1, const Type* t2) const = 0;
|
||||
|
@ -61,7 +61,7 @@ public:
|
|||
|
||||
OverflowLNode(Node* in1, Node* in2) : OverflowNode(in1, in2) {}
|
||||
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
|
||||
virtual const Type* Value(PhaseTransform* phase) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
|
||||
virtual bool will_overflow(jlong v1, jlong v2) const = 0;
|
||||
virtual bool can_overflow(const Type* t1, const Type* t2) const = 0;
|
||||
|
|
|
@ -1069,7 +1069,7 @@ bool LoadNode::is_instance_field_load_with_local_phi(Node* ctrl) {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Loads are identity if previous store is to same address
|
||||
Node *LoadNode::Identity( PhaseTransform *phase ) {
|
||||
Node* LoadNode::Identity(PhaseGVN* phase) {
|
||||
// If the previous store-maker is the right kind of Store, and the store is
|
||||
// to the same address, then we are equal to the value stored.
|
||||
Node* mem = in(Memory);
|
||||
|
@ -1615,7 +1615,7 @@ static const Type* fold_stable_ary_elem(const TypeAryPtr* ary, int off, BasicTyp
|
|||
}
|
||||
|
||||
//------------------------------Value-----------------------------------------
|
||||
const Type *LoadNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* LoadNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
Node* mem = in(MemNode::Memory);
|
||||
const Type *t1 = phase->type(mem);
|
||||
|
@ -1901,7 +1901,7 @@ Node *LoadBNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
return LoadNode::Ideal(phase, can_reshape);
|
||||
}
|
||||
|
||||
const Type* LoadBNode::Value(PhaseTransform *phase) const {
|
||||
const Type* LoadBNode::Value(PhaseGVN* phase) const {
|
||||
Node* mem = in(MemNode::Memory);
|
||||
Node* value = can_see_stored_value(mem,phase);
|
||||
if (value != NULL && value->is_Con() &&
|
||||
|
@ -1931,7 +1931,7 @@ Node* LoadUBNode::Ideal(PhaseGVN* phase, bool can_reshape) {
|
|||
return LoadNode::Ideal(phase, can_reshape);
|
||||
}
|
||||
|
||||
const Type* LoadUBNode::Value(PhaseTransform *phase) const {
|
||||
const Type* LoadUBNode::Value(PhaseGVN* phase) const {
|
||||
Node* mem = in(MemNode::Memory);
|
||||
Node* value = can_see_stored_value(mem,phase);
|
||||
if (value != NULL && value->is_Con() &&
|
||||
|
@ -1961,7 +1961,7 @@ Node *LoadUSNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
return LoadNode::Ideal(phase, can_reshape);
|
||||
}
|
||||
|
||||
const Type* LoadUSNode::Value(PhaseTransform *phase) const {
|
||||
const Type* LoadUSNode::Value(PhaseGVN* phase) const {
|
||||
Node* mem = in(MemNode::Memory);
|
||||
Node* value = can_see_stored_value(mem,phase);
|
||||
if (value != NULL && value->is_Con() &&
|
||||
|
@ -1993,7 +1993,7 @@ Node *LoadSNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
return LoadNode::Ideal(phase, can_reshape);
|
||||
}
|
||||
|
||||
const Type* LoadSNode::Value(PhaseTransform *phase) const {
|
||||
const Type* LoadSNode::Value(PhaseGVN* phase) const {
|
||||
Node* mem = in(MemNode::Memory);
|
||||
Node* value = can_see_stored_value(mem,phase);
|
||||
if (value != NULL && value->is_Con() &&
|
||||
|
@ -2026,7 +2026,7 @@ Node* LoadKlassNode::make(PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *LoadKlassNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* LoadKlassNode::Value(PhaseGVN* phase) const {
|
||||
return klass_value_common(phase);
|
||||
}
|
||||
|
||||
|
@ -2036,7 +2036,7 @@ bool LoadKlassNode::can_remove_control() const {
|
|||
return false;
|
||||
}
|
||||
|
||||
const Type *LoadNode::klass_value_common( PhaseTransform *phase ) const {
|
||||
const Type* LoadNode::klass_value_common(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(MemNode::Memory) );
|
||||
if (t1 == Type::TOP) return Type::TOP;
|
||||
|
@ -2172,11 +2172,11 @@ const Type *LoadNode::klass_value_common( PhaseTransform *phase ) const {
|
|||
//------------------------------Identity---------------------------------------
|
||||
// To clean up reflective code, simplify k.java_mirror.as_klass to plain k.
|
||||
// Also feed through the klass in Allocate(...klass...)._klass.
|
||||
Node* LoadKlassNode::Identity( PhaseTransform *phase ) {
|
||||
Node* LoadKlassNode::Identity(PhaseGVN* phase) {
|
||||
return klass_identity_common(phase);
|
||||
}
|
||||
|
||||
Node* LoadNode::klass_identity_common(PhaseTransform *phase ) {
|
||||
Node* LoadNode::klass_identity_common(PhaseGVN* phase) {
|
||||
Node* x = LoadNode::Identity(phase);
|
||||
if (x != this) return x;
|
||||
|
||||
|
@ -2231,7 +2231,7 @@ Node* LoadNode::klass_identity_common(PhaseTransform *phase ) {
|
|||
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *LoadNKlassNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* LoadNKlassNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = klass_value_common(phase);
|
||||
if (t == Type::TOP)
|
||||
return t;
|
||||
|
@ -2242,7 +2242,7 @@ const Type *LoadNKlassNode::Value( PhaseTransform *phase ) const {
|
|||
//------------------------------Identity---------------------------------------
|
||||
// To clean up reflective code, simplify k.java_mirror.as_klass to narrow k.
|
||||
// Also feed through the klass in Allocate(...klass...)._klass.
|
||||
Node* LoadNKlassNode::Identity( PhaseTransform *phase ) {
|
||||
Node* LoadNKlassNode::Identity(PhaseGVN* phase) {
|
||||
Node *x = klass_identity_common(phase);
|
||||
|
||||
const Type *t = phase->type( x );
|
||||
|
@ -2254,7 +2254,7 @@ Node* LoadNKlassNode::Identity( PhaseTransform *phase ) {
|
|||
}
|
||||
|
||||
//------------------------------Value-----------------------------------------
|
||||
const Type *LoadRangeNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* LoadRangeNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(MemNode::Memory) );
|
||||
if( t1 == Type::TOP ) return Type::TOP;
|
||||
|
@ -2302,7 +2302,7 @@ Node *LoadRangeNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Feed through the length in AllocateArray(...length...)._length.
|
||||
Node* LoadRangeNode::Identity( PhaseTransform *phase ) {
|
||||
Node* LoadRangeNode::Identity(PhaseGVN* phase) {
|
||||
Node* x = LoadINode::Identity(phase);
|
||||
if (x != this) return x;
|
||||
|
||||
|
@ -2473,7 +2473,7 @@ Node *StoreNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
}
|
||||
|
||||
//------------------------------Value-----------------------------------------
|
||||
const Type *StoreNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* StoreNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(MemNode::Memory) );
|
||||
if( t1 == Type::TOP ) return Type::TOP;
|
||||
|
@ -2488,7 +2488,7 @@ const Type *StoreNode::Value( PhaseTransform *phase ) const {
|
|||
// Remove redundant stores:
|
||||
// Store(m, p, Load(m, p)) changes to m.
|
||||
// Store(, p, x) -> Store(m, p, x) changes to Store(m, p, x).
|
||||
Node *StoreNode::Identity( PhaseTransform *phase ) {
|
||||
Node* StoreNode::Identity(PhaseGVN* phase) {
|
||||
Node* mem = in(MemNode::Memory);
|
||||
Node* adr = in(MemNode::Address);
|
||||
Node* val = in(MemNode::ValueIn);
|
||||
|
@ -2642,7 +2642,7 @@ Node *StoreCNode::Ideal(PhaseGVN *phase, bool can_reshape){
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *StoreCMNode::Identity( PhaseTransform *phase ) {
|
||||
Node* StoreCMNode::Identity(PhaseGVN* phase) {
|
||||
// No need to card mark when storing a null ptr
|
||||
Node* my_store = in(MemNode::OopStore);
|
||||
if (my_store->is_Store()) {
|
||||
|
@ -2671,7 +2671,7 @@ Node *StoreCMNode::Ideal(PhaseGVN *phase, bool can_reshape){
|
|||
}
|
||||
|
||||
//------------------------------Value-----------------------------------------
|
||||
const Type *StoreCMNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* StoreCMNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t = phase->type( in(MemNode::Memory) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
|
@ -2689,7 +2689,7 @@ const Type *StoreCMNode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//----------------------------------SCMemProjNode------------------------------
|
||||
const Type * SCMemProjNode::Value( PhaseTransform *phase ) const
|
||||
const Type* SCMemProjNode::Value(PhaseGVN* phase) const
|
||||
{
|
||||
return bottom_type();
|
||||
}
|
||||
|
@ -2745,7 +2745,7 @@ uint ClearArrayNode::match_edge(uint idx) const {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Clearing a zero length array does nothing
|
||||
Node *ClearArrayNode::Identity( PhaseTransform *phase ) {
|
||||
Node* ClearArrayNode::Identity(PhaseGVN* phase) {
|
||||
return phase->type(in(2))->higher_equal(TypeX::ZERO) ? in(1) : this;
|
||||
}
|
||||
|
||||
|
@ -3001,7 +3001,7 @@ Node *MemBarNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *MemBarNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* MemBarNode::Value(PhaseGVN* phase) const {
|
||||
if( !in(0) ) return Type::TOP;
|
||||
if( phase->type(in(0)) == Type::TOP )
|
||||
return Type::TOP;
|
||||
|
@ -4143,7 +4143,7 @@ uint MergeMemNode::cmp( const Node &n ) const {
|
|||
}
|
||||
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node* MergeMemNode::Identity(PhaseTransform *phase) {
|
||||
Node* MergeMemNode::Identity(PhaseGVN* phase) {
|
||||
// Identity if this merge point does not record any interesting memory
|
||||
// disambiguations.
|
||||
Node* base_mem = base_memory();
|
||||
|
|
|
@ -207,7 +207,7 @@ public:
|
|||
|
||||
// Handle algebraic identities here. If we have an identity, return the Node
|
||||
// we are equivalent to. We look for Load of a Store.
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
|
||||
// If the load is from Field memory and the pointer is non-null, it might be possible to
|
||||
// zero out the control input.
|
||||
|
@ -223,11 +223,11 @@ public:
|
|||
|
||||
// Compute a new Type for this node. Basically we just do the pre-check,
|
||||
// then call the virtual add() to set the type.
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
|
||||
// Common methods for LoadKlass and LoadNKlass nodes.
|
||||
const Type *klass_value_common( PhaseTransform *phase ) const;
|
||||
Node *klass_identity_common( PhaseTransform *phase );
|
||||
const Type* klass_value_common(PhaseGVN* phase) const;
|
||||
Node* klass_identity_common(PhaseGVN* phase);
|
||||
|
||||
virtual uint ideal_reg() const;
|
||||
virtual const Type *bottom_type() const;
|
||||
|
@ -284,7 +284,7 @@ public:
|
|||
virtual int Opcode() const;
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value(PhaseTransform *phase) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual int store_Opcode() const { return Op_StoreB; }
|
||||
virtual BasicType memory_type() const { return T_BYTE; }
|
||||
};
|
||||
|
@ -298,7 +298,7 @@ public:
|
|||
virtual int Opcode() const;
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
virtual Node* Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value(PhaseTransform *phase) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual int store_Opcode() const { return Op_StoreB; }
|
||||
virtual BasicType memory_type() const { return T_BYTE; }
|
||||
};
|
||||
|
@ -312,7 +312,7 @@ public:
|
|||
virtual int Opcode() const;
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value(PhaseTransform *phase) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual int store_Opcode() const { return Op_StoreC; }
|
||||
virtual BasicType memory_type() const { return T_CHAR; }
|
||||
};
|
||||
|
@ -326,7 +326,7 @@ public:
|
|||
virtual int Opcode() const;
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value(PhaseTransform *phase) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual int store_Opcode() const { return Op_StoreC; }
|
||||
virtual BasicType memory_type() const { return T_SHORT; }
|
||||
};
|
||||
|
@ -350,8 +350,8 @@ public:
|
|||
LoadRangeNode(Node *c, Node *mem, Node *adr, const TypeInt *ti = TypeInt::POS)
|
||||
: LoadINode(c, mem, adr, TypeAryPtr::RANGE, ti, MemNode::unordered) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
};
|
||||
|
||||
|
@ -483,8 +483,8 @@ public:
|
|||
LoadKlassNode(Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeKlassPtr *tk, MemOrd mo)
|
||||
: LoadPNode(c, mem, adr, at, tk, mo) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual bool depends_only_on_test() const { return true; }
|
||||
|
||||
// Polymorphic factory method:
|
||||
|
@ -503,8 +503,8 @@ public:
|
|||
virtual int store_Opcode() const { return Op_StoreNKlass; }
|
||||
virtual BasicType memory_type() const { return T_NARROWKLASS; }
|
||||
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual bool depends_only_on_test() const { return true; }
|
||||
};
|
||||
|
||||
|
@ -581,10 +581,10 @@ public:
|
|||
|
||||
// Compute a new Type for this node. Basically we just do the pre-check,
|
||||
// then call the virtual add() to set the type.
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
|
||||
// Check for identity function on memory (Load then Store at same address)
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
|
||||
// Do not match memory edge
|
||||
virtual uint match_edge(uint idx) const;
|
||||
|
@ -746,9 +746,9 @@ public:
|
|||
"bad oop alias idx");
|
||||
}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual BasicType memory_type() const { return T_VOID; } // unspecific
|
||||
int oop_alias_idx() const { return _oop_alias_idx; }
|
||||
};
|
||||
|
@ -782,7 +782,7 @@ public:
|
|||
return ctrl->in(MemNode::Memory)->adr_type();
|
||||
}
|
||||
virtual uint ideal_reg() const { return 0;} // memory projections don't have a register
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
#ifndef PRODUCT
|
||||
virtual void dump_spec(outputStream *st) const {};
|
||||
#endif
|
||||
|
@ -934,7 +934,7 @@ public:
|
|||
// ClearArray modifies array elements, and so affects only the
|
||||
// array memory addressed by the bottom_type of its base address.
|
||||
virtual const class TypePtr *adr_type() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual uint match_edge(uint idx) const;
|
||||
|
||||
|
@ -983,7 +983,7 @@ public:
|
|||
MemBarNode(Compile* C, int alias_idx, Node* precedent);
|
||||
virtual int Opcode() const = 0;
|
||||
virtual const class TypePtr *adr_type() const { return _adr_type; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual uint match_edge(uint idx) const { return 0; }
|
||||
virtual const Type *bottom_type() const { return TypeTuple::MEMBAR; }
|
||||
|
@ -1199,7 +1199,7 @@ public:
|
|||
static MergeMemNode* make(Node* base_memory);
|
||||
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual uint ideal_reg() const { return NotAMachineReg; }
|
||||
virtual uint match_edge(uint idx) const { return 0; }
|
||||
|
|
|
@ -121,7 +121,7 @@ Node *CMoveNode::is_cmove_id( PhaseTransform *phase, Node *cmp, Node *t, Node *f
|
|||
//------------------------------Identity---------------------------------------
|
||||
// Conditional-move is an identity if both inputs are the same, or the test
|
||||
// true or false.
|
||||
Node *CMoveNode::Identity( PhaseTransform *phase ) {
|
||||
Node* CMoveNode::Identity(PhaseGVN* phase) {
|
||||
if( phase->eqv(in(IfFalse),in(IfTrue)) ) // C-moving identical inputs?
|
||||
return in(IfFalse); // Then it doesn't matter
|
||||
if( phase->type(in(Condition)) == TypeInt::ZERO )
|
||||
|
@ -149,7 +149,7 @@ Node *CMoveNode::Identity( PhaseTransform *phase ) {
|
|||
|
||||
//------------------------------Value------------------------------------------
|
||||
// Result is the meet of inputs
|
||||
const Type *CMoveNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* CMoveNode::Value(PhaseGVN* phase) const {
|
||||
if( phase->type(in(Condition)) == Type::TOP )
|
||||
return Type::TOP;
|
||||
return phase->type(in(IfFalse))->meet_speculative(phase->type(in(IfTrue)));
|
||||
|
@ -351,7 +351,7 @@ Node *CMoveDNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *MoveL2DNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* MoveL2DNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
const TypeLong *tl = t->is_long();
|
||||
|
@ -362,7 +362,7 @@ const Type *MoveL2DNode::Value( PhaseTransform *phase ) const {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *MoveI2FNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* MoveI2FNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
const TypeInt *ti = t->is_int();
|
||||
|
@ -373,7 +373,7 @@ const Type *MoveI2FNode::Value( PhaseTransform *phase ) const {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *MoveF2INode::Value( PhaseTransform *phase ) const {
|
||||
const Type* MoveF2INode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
if( t == Type::FLOAT ) return TypeInt::INT;
|
||||
|
@ -384,7 +384,7 @@ const Type *MoveF2INode::Value( PhaseTransform *phase ) const {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *MoveD2LNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* MoveD2LNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return Type::TOP;
|
||||
if( t == Type::DOUBLE ) return TypeLong::LONG;
|
||||
|
|
|
@ -45,8 +45,8 @@ class CMoveNode : public TypeNode {
|
|||
init_req(IfTrue,right);
|
||||
}
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
static CMoveNode *make(Node *c, Node *bol, Node *left, Node *right, const Type *t);
|
||||
// Helper function to spot cmove graph shapes
|
||||
static Node *is_cmove_id( PhaseTransform *phase, Node *cmp, Node *t, Node *f, BoolNode *b );
|
||||
|
@ -104,7 +104,7 @@ class MoveI2FNode : public Node {
|
|||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return Type::FLOAT; }
|
||||
virtual uint ideal_reg() const { return Op_RegF; }
|
||||
virtual const Type* Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
class MoveL2DNode : public Node {
|
||||
|
@ -113,7 +113,7 @@ class MoveL2DNode : public Node {
|
|||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return Type::DOUBLE; }
|
||||
virtual uint ideal_reg() const { return Op_RegD; }
|
||||
virtual const Type* Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
class MoveF2INode : public Node {
|
||||
|
@ -122,7 +122,7 @@ class MoveF2INode : public Node {
|
|||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return TypeInt::INT; }
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
virtual const Type* Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
class MoveD2LNode : public Node {
|
||||
|
@ -131,7 +131,7 @@ class MoveD2LNode : public Node {
|
|||
virtual int Opcode() const;
|
||||
virtual const Type *bottom_type() const { return TypeLong::LONG; }
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
virtual const Type* Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
//------------------------------BinaryNode-------------------------------------
|
||||
|
|
|
@ -46,7 +46,7 @@ uint MulNode::hash() const {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Multiplying a one preserves the other argument
|
||||
Node *MulNode::Identity( PhaseTransform *phase ) {
|
||||
Node* MulNode::Identity(PhaseGVN* phase) {
|
||||
register const Type *one = mul_id(); // The multiplicative identity
|
||||
if( phase->type( in(1) )->higher_equal( one ) ) return in(2);
|
||||
if( phase->type( in(2) )->higher_equal( one ) ) return in(1);
|
||||
|
@ -139,7 +139,7 @@ Node *MulNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
}
|
||||
|
||||
//------------------------------Value-----------------------------------------
|
||||
const Type *MulNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* MulNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
// Either input is TOP ==> the result is TOP
|
||||
|
@ -381,7 +381,7 @@ const Type *MulDNode::mul_ring(const Type *t0, const Type *t1) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *MulHiLNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* MulHiLNode::Value(PhaseGVN* phase) const {
|
||||
// Either input is TOP ==> the result is TOP
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
|
@ -432,7 +432,7 @@ const Type *AndINode::mul_ring( const Type *t0, const Type *t1 ) const {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Masking off the high bits of an unsigned load is not required
|
||||
Node *AndINode::Identity( PhaseTransform *phase ) {
|
||||
Node* AndINode::Identity(PhaseGVN* phase) {
|
||||
|
||||
// x & x => x
|
||||
if (phase->eqv(in(1), in(2))) return in(1);
|
||||
|
@ -562,7 +562,7 @@ const Type *AndLNode::mul_ring( const Type *t0, const Type *t1 ) const {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Masking off the high bits of an unsigned load is not required
|
||||
Node *AndLNode::Identity( PhaseTransform *phase ) {
|
||||
Node* AndLNode::Identity(PhaseGVN* phase) {
|
||||
|
||||
// x & x => x
|
||||
if (phase->eqv(in(1), in(2))) return in(1);
|
||||
|
@ -639,7 +639,7 @@ Node *AndLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *LShiftINode::Identity( PhaseTransform *phase ) {
|
||||
Node* LShiftINode::Identity(PhaseGVN* phase) {
|
||||
const TypeInt *ti = phase->type( in(2) )->isa_int(); // shift count is an int
|
||||
return ( ti && ti->is_con() && ( ti->get_con() & ( BitsPerInt - 1 ) ) == 0 ) ? in(1) : this;
|
||||
}
|
||||
|
@ -704,7 +704,7 @@ Node *LShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//------------------------------Value------------------------------------------
|
||||
// A LShiftINode shifts its input2 left by input1 amount.
|
||||
const Type *LShiftINode::Value( PhaseTransform *phase ) const {
|
||||
const Type* LShiftINode::Value(PhaseGVN* phase) const {
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
// Either input is TOP ==> the result is TOP
|
||||
|
@ -751,7 +751,7 @@ const Type *LShiftINode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *LShiftLNode::Identity( PhaseTransform *phase ) {
|
||||
Node* LShiftLNode::Identity(PhaseGVN* phase) {
|
||||
const TypeInt *ti = phase->type( in(2) )->isa_int(); // shift count is an int
|
||||
return ( ti && ti->is_con() && ( ti->get_con() & ( BitsPerLong - 1 ) ) == 0 ) ? in(1) : this;
|
||||
}
|
||||
|
@ -813,7 +813,7 @@ Node *LShiftLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//------------------------------Value------------------------------------------
|
||||
// A LShiftLNode shifts its input2 left by input1 amount.
|
||||
const Type *LShiftLNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* LShiftLNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
// Either input is TOP ==> the result is TOP
|
||||
|
@ -860,7 +860,7 @@ const Type *LShiftLNode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *RShiftINode::Identity( PhaseTransform *phase ) {
|
||||
Node* RShiftINode::Identity(PhaseGVN* phase) {
|
||||
const TypeInt *t2 = phase->type(in(2))->isa_int();
|
||||
if( !t2 ) return this;
|
||||
if ( t2->is_con() && ( t2->get_con() & ( BitsPerInt - 1 ) ) == 0 )
|
||||
|
@ -959,7 +959,7 @@ Node *RShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//------------------------------Value------------------------------------------
|
||||
// A RShiftINode shifts its input2 right by input1 amount.
|
||||
const Type *RShiftINode::Value( PhaseTransform *phase ) const {
|
||||
const Type* RShiftINode::Value(PhaseGVN* phase) const {
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
// Either input is TOP ==> the result is TOP
|
||||
|
@ -1014,14 +1014,14 @@ const Type *RShiftINode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *RShiftLNode::Identity( PhaseTransform *phase ) {
|
||||
Node* RShiftLNode::Identity(PhaseGVN* phase) {
|
||||
const TypeInt *ti = phase->type( in(2) )->isa_int(); // shift count is an int
|
||||
return ( ti && ti->is_con() && ( ti->get_con() & ( BitsPerLong - 1 ) ) == 0 ) ? in(1) : this;
|
||||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
// A RShiftLNode shifts its input2 right by input1 amount.
|
||||
const Type *RShiftLNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* RShiftLNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
// Either input is TOP ==> the result is TOP
|
||||
|
@ -1072,7 +1072,7 @@ const Type *RShiftLNode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *URShiftINode::Identity( PhaseTransform *phase ) {
|
||||
Node* URShiftINode::Identity(PhaseGVN* phase) {
|
||||
const TypeInt *ti = phase->type( in(2) )->isa_int();
|
||||
if ( ti && ti->is_con() && ( ti->get_con() & ( BitsPerInt - 1 ) ) == 0 ) return in(1);
|
||||
|
||||
|
@ -1168,7 +1168,7 @@ Node *URShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//------------------------------Value------------------------------------------
|
||||
// A URShiftINode shifts its input2 right by input1 amount.
|
||||
const Type *URShiftINode::Value( PhaseTransform *phase ) const {
|
||||
const Type* URShiftINode::Value(PhaseGVN* phase) const {
|
||||
// (This is a near clone of RShiftINode::Value.)
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
|
@ -1242,7 +1242,7 @@ const Type *URShiftINode::Value( PhaseTransform *phase ) const {
|
|||
|
||||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
Node *URShiftLNode::Identity( PhaseTransform *phase ) {
|
||||
Node* URShiftLNode::Identity(PhaseGVN* phase) {
|
||||
const TypeInt *ti = phase->type( in(2) )->isa_int(); // shift count is an int
|
||||
return ( ti && ti->is_con() && ( ti->get_con() & ( BitsPerLong - 1 ) ) == 0 ) ? in(1) : this;
|
||||
}
|
||||
|
@ -1297,7 +1297,7 @@ Node *URShiftLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
|
||||
//------------------------------Value------------------------------------------
|
||||
// A URShiftINode shifts its input2 right by input1 amount.
|
||||
const Type *URShiftLNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* URShiftLNode::Value(PhaseGVN* phase) const {
|
||||
// (This is a near clone of RShiftLNode::Value.)
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
const Type *t2 = phase->type( in(2) );
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
|
||||
// Handle algebraic identities here. If we have an identity, return the Node
|
||||
// we are equivalent to. We look for "add of zero" as an identity.
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
|
||||
// We also canonicalize the Node, moving constants to the right input,
|
||||
// and flatten expressions (so that 1+x+2 becomes x+3).
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
// Compute a new Type for this node. Basically we just do the pre-check,
|
||||
// then call the virtual add() to set the type.
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
|
||||
// Supplied function returns the product of the inputs.
|
||||
// This also type-checks the inputs for sanity. Guaranteed never to
|
||||
|
@ -146,7 +146,7 @@ class MulHiLNode : public Node {
|
|||
public:
|
||||
MulHiLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
const Type *bottom_type() const { return TypeLong::LONG; }
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
};
|
||||
|
@ -159,7 +159,7 @@ public:
|
|||
AndINode( Node *in1, Node *in2 ) : MulINode(in1,in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type *mul_ring( const Type *, const Type * ) const;
|
||||
const Type *mul_id() const { return TypeInt::MINUS_1; }
|
||||
const Type *add_id() const { return TypeInt::ZERO; }
|
||||
|
@ -176,7 +176,7 @@ public:
|
|||
AndLNode( Node *in1, Node *in2 ) : MulLNode(in1,in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type *mul_ring( const Type *, const Type * ) const;
|
||||
const Type *mul_id() const { return TypeLong::MINUS_1; }
|
||||
const Type *add_id() const { return TypeLong::ZERO; }
|
||||
|
@ -191,9 +191,9 @@ class LShiftINode : public Node {
|
|||
public:
|
||||
LShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
const Type *bottom_type() const { return TypeInt::INT; }
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
};
|
||||
|
@ -204,9 +204,9 @@ class LShiftLNode : public Node {
|
|||
public:
|
||||
LShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
const Type *bottom_type() const { return TypeLong::LONG; }
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
};
|
||||
|
@ -217,9 +217,9 @@ class RShiftINode : public Node {
|
|||
public:
|
||||
RShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
const Type *bottom_type() const { return TypeInt::INT; }
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
};
|
||||
|
@ -230,8 +230,8 @@ class RShiftLNode : public Node {
|
|||
public:
|
||||
RShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
const Type *bottom_type() const { return TypeLong::LONG; }
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
};
|
||||
|
@ -243,9 +243,9 @@ class URShiftINode : public Node {
|
|||
public:
|
||||
URShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
const Type *bottom_type() const { return TypeInt::INT; }
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
};
|
||||
|
@ -256,9 +256,9 @@ class URShiftLNode : public Node {
|
|||
public:
|
||||
URShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
const Type *bottom_type() const { return TypeLong::LONG; }
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
};
|
||||
|
|
|
@ -147,7 +147,7 @@ void ProjNode::check_con() const {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *ProjNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* ProjNode::Value(PhaseGVN* phase) const {
|
||||
if (in(0) == NULL) return Type::TOP;
|
||||
return proj_type(phase->type(in(0)));
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
virtual const Type *bottom_type() const;
|
||||
virtual const TypePtr *adr_type() const;
|
||||
virtual bool pinned() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual uint ideal_reg() const;
|
||||
virtual const RegMask &out_RegMask() const;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "opto/narrowptrnode.hpp"
|
||||
#include "opto/phaseX.hpp"
|
||||
|
||||
Node* DecodeNNode::Identity(PhaseTransform* phase) {
|
||||
Node* DecodeNNode::Identity(PhaseGVN* phase) {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return in(1);
|
||||
|
||||
|
@ -37,7 +37,7 @@ Node* DecodeNNode::Identity(PhaseTransform* phase) {
|
|||
return this;
|
||||
}
|
||||
|
||||
const Type *DecodeNNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* DecodeNNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if (t == Type::TOP) return Type::TOP;
|
||||
if (t == TypeNarrowOop::NULL_PTR) return TypePtr::NULL_PTR;
|
||||
|
@ -46,7 +46,7 @@ const Type *DecodeNNode::Value( PhaseTransform *phase ) const {
|
|||
return t->make_ptr();
|
||||
}
|
||||
|
||||
Node* EncodePNode::Identity(PhaseTransform* phase) {
|
||||
Node* EncodePNode::Identity(PhaseGVN* phase) {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return in(1);
|
||||
|
||||
|
@ -57,7 +57,7 @@ Node* EncodePNode::Identity(PhaseTransform* phase) {
|
|||
return this;
|
||||
}
|
||||
|
||||
const Type *EncodePNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* EncodePNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if (t == Type::TOP) return Type::TOP;
|
||||
if (t == TypePtr::NULL_PTR) return TypeNarrowOop::NULL_PTR;
|
||||
|
@ -67,7 +67,7 @@ const Type *EncodePNode::Value( PhaseTransform *phase ) const {
|
|||
}
|
||||
|
||||
|
||||
Node* DecodeNKlassNode::Identity(PhaseTransform* phase) {
|
||||
Node* DecodeNKlassNode::Identity(PhaseGVN* phase) {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return in(1);
|
||||
|
||||
|
@ -78,7 +78,7 @@ Node* DecodeNKlassNode::Identity(PhaseTransform* phase) {
|
|||
return this;
|
||||
}
|
||||
|
||||
const Type *DecodeNKlassNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* DecodeNKlassNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if (t == Type::TOP) return Type::TOP;
|
||||
assert(t != TypeNarrowKlass::NULL_PTR, "null klass?");
|
||||
|
@ -87,7 +87,7 @@ const Type *DecodeNKlassNode::Value( PhaseTransform *phase ) const {
|
|||
return t->make_ptr();
|
||||
}
|
||||
|
||||
Node* EncodePKlassNode::Identity(PhaseTransform* phase) {
|
||||
Node* EncodePKlassNode::Identity(PhaseGVN* phase) {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if( t == Type::TOP ) return in(1);
|
||||
|
||||
|
@ -98,7 +98,7 @@ Node* EncodePKlassNode::Identity(PhaseTransform* phase) {
|
|||
return this;
|
||||
}
|
||||
|
||||
const Type *EncodePKlassNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* EncodePKlassNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t = phase->type( in(1) );
|
||||
if (t == Type::TOP) return Type::TOP;
|
||||
assert (t != TypePtr::NULL_PTR, "null klass?");
|
||||
|
|
|
@ -52,8 +52,8 @@ class EncodePNode : public EncodeNarrowPtrNode {
|
|||
init_class_id(Class_EncodeP);
|
||||
}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
//------------------------------EncodePKlass--------------------------------
|
||||
|
@ -67,8 +67,8 @@ class EncodePKlassNode : public EncodeNarrowPtrNode {
|
|||
init_class_id(Class_EncodePKlass);
|
||||
}
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
//------------------------------DecodeNarrowPtr--------------------------------
|
||||
|
@ -95,8 +95,8 @@ class DecodeNNode : public DecodeNarrowPtrNode {
|
|||
init_class_id(Class_DecodeN);
|
||||
}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
};
|
||||
|
||||
//------------------------------DecodeNKlass--------------------------------
|
||||
|
@ -110,8 +110,8 @@ class DecodeNKlassNode : public DecodeNarrowPtrNode {
|
|||
init_class_id(Class_DecodeNKlass);
|
||||
}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_OPTO_NARROWPTRNODE_HPP
|
||||
|
|
|
@ -1071,13 +1071,13 @@ void Node::raise_bottom_type(const Type* new_type) {
|
|||
|
||||
//------------------------------Identity---------------------------------------
|
||||
// Return a node that the given node is equivalent to.
|
||||
Node *Node::Identity( PhaseTransform * ) {
|
||||
Node* Node::Identity(PhaseGVN* phase) {
|
||||
return this; // Default to no identities
|
||||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
// Compute a new Type for a node using the Type of the inputs.
|
||||
const Type *Node::Value( PhaseTransform * ) const {
|
||||
const Type* Node::Value(PhaseGVN* phase) const {
|
||||
return bottom_type(); // Default to worst-case Type
|
||||
}
|
||||
|
||||
|
@ -2456,7 +2456,7 @@ uint TypeNode::hash() const {
|
|||
uint TypeNode::cmp( const Node &n ) const
|
||||
{ return !Type::cmp( _type, ((TypeNode&)n)._type ); }
|
||||
const Type *TypeNode::bottom_type() const { return _type; }
|
||||
const Type *TypeNode::Value( PhaseTransform * ) const { return _type; }
|
||||
const Type* TypeNode::Value(PhaseGVN* phase) const { return _type; }
|
||||
|
||||
//------------------------------ideal_reg--------------------------------------
|
||||
uint TypeNode::ideal_reg() const {
|
||||
|
|
|
@ -926,10 +926,10 @@ public:
|
|||
// Return an existing node which computes the same function as this node.
|
||||
// The optimistic combined algorithm requires this to return a Node which
|
||||
// is a small number of steps away (e.g., one of my inputs).
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
|
||||
// Return the set of values this Node can take on at runtime.
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
|
||||
// Return a node which is more "ideal" than the current node.
|
||||
// The invariants on this call are subtle. If in doubt, read the
|
||||
|
@ -1696,7 +1696,7 @@ public:
|
|||
TypeNode( const Type *t, uint required ) : Node(required), _type(t) {
|
||||
init_class_id(Class_Type);
|
||||
}
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual const Type *bottom_type() const;
|
||||
virtual uint ideal_reg() const;
|
||||
#ifndef PRODUCT
|
||||
|
|
|
@ -40,7 +40,7 @@ uint Opaque1Node::cmp( const Node &n ) const {
|
|||
// call to IterGVN and any chance of hitting this code. Hence there's no
|
||||
// phase-ordering problem with stripping Opaque1 in IGVN followed by some
|
||||
// more loop optimizations that require it.
|
||||
Node *Opaque1Node::Identity( PhaseTransform *phase ) {
|
||||
Node* Opaque1Node::Identity(PhaseGVN* phase) {
|
||||
return phase->C->major_progress() ? this : in(1);
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ Node *ProfileBooleanNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
}
|
||||
}
|
||||
|
||||
Node *ProfileBooleanNode::Identity( PhaseTransform *phase ) {
|
||||
Node* ProfileBooleanNode::Identity(PhaseGVN* phase) {
|
||||
if (_delay_removal) {
|
||||
return this;
|
||||
} else {
|
||||
|
|
|
@ -50,7 +50,7 @@ class Opaque1Node : public Node {
|
|||
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 );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
};
|
||||
|
||||
//------------------------------Opaque2Node------------------------------------
|
||||
|
@ -109,7 +109,7 @@ class ProfileBooleanNode : public Node {
|
|||
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual Node *Identity(PhaseTransform *phase);
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
virtual const Type *bottom_type() const { return TypeInt::BOOL; }
|
||||
};
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ Node *HaltNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
}
|
||||
|
||||
//------------------------------Value------------------------------------------
|
||||
const Type *HaltNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* HaltNode::Value(PhaseGVN* phase) const {
|
||||
return ( phase->type(in(TypeFunc::Control)) == Type::TOP)
|
||||
? Type::TOP
|
||||
: Type::BOTTOM;
|
||||
|
|
|
@ -42,9 +42,9 @@ public:
|
|||
virtual int Opcode() const;
|
||||
virtual const Node *is_block_proj() const { return this; }
|
||||
virtual const Type *bottom_type() const { return Type::BOTTOM; }
|
||||
virtual Node *Identity( PhaseTransform *phase ) { return this; }
|
||||
virtual Node* Identity(PhaseGVN* phase) { return this; }
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const { return Type::BOTTOM; }
|
||||
virtual const Type* Value(PhaseGVN* phase) const { return Type::BOTTOM; }
|
||||
};
|
||||
|
||||
//------------------------------HaltNode---------------------------------------
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
virtual int Opcode() const;
|
||||
virtual bool pinned() const { return true; };
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual const Type *bottom_type() const;
|
||||
virtual bool is_CFG() const { return true; }
|
||||
virtual uint hash() const { return NO_HASH; } // CFG nodes do not hash
|
||||
|
|
|
@ -822,11 +822,10 @@ bool StringConcat::validate_mem_flow() {
|
|||
}
|
||||
} else if (ctrl->is_IfTrue()) { // null checks, class checks
|
||||
iff = ctrl->in(0)->as_If();
|
||||
assert(iff->is_If(), "must be if");
|
||||
// Verify that the other arm is an uncommon trap
|
||||
Node* otherproj = iff->proj_out(1 - ctrl->as_Proj()->_con);
|
||||
CallStaticJavaNode* call = otherproj->unique_out()->isa_CallStaticJava();
|
||||
assert(strcmp(call->_name, "uncommon_trap") == 0, "must be uncommond trap");
|
||||
assert(strcmp(call->_name, "uncommon_trap") == 0, "must be uncommon trap");
|
||||
ctrl = iff->in(0);
|
||||
} else {
|
||||
break;
|
||||
|
@ -914,6 +913,13 @@ bool StringConcat::validate_control_flow() {
|
|||
BoolNode* b = iff->in(1)->isa_Bool();
|
||||
|
||||
if (b == NULL) {
|
||||
#ifndef PRODUCT
|
||||
if (PrintOptimizeStringConcat) {
|
||||
tty->print_cr("unexpected input to IfNode");
|
||||
iff->in(1)->dump();
|
||||
tty->cr();
|
||||
}
|
||||
#endif
|
||||
fail = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
//=============================================================================
|
||||
//------------------------------Identity---------------------------------------
|
||||
// If right input is a constant 0, return the left input.
|
||||
Node *SubNode::Identity( PhaseTransform *phase ) {
|
||||
Node* SubNode::Identity(PhaseGVN* phase) {
|
||||
assert(in(1) != this, "Must already have called Value");
|
||||
assert(in(2) != this, "Must already have called Value");
|
||||
|
||||
|
@ -100,7 +100,7 @@ const Type* SubNode::Value_common(PhaseTransform *phase) const {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const Type* SubNode::Value(PhaseTransform *phase) const {
|
||||
const Type* SubNode::Value(PhaseGVN* phase) const {
|
||||
const Type* t = Value_common(phase);
|
||||
if (t != NULL) {
|
||||
return t;
|
||||
|
@ -378,7 +378,7 @@ const Type *SubLNode::sub( const Type *t1, const Type *t2 ) const {
|
|||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
// A subtract node differences its two inputs.
|
||||
const Type *SubFPNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* SubFPNode::Value(PhaseGVN* phase) const {
|
||||
const Node* in1 = in(1);
|
||||
const Node* in2 = in(2);
|
||||
// Either input is TOP ==> the result is TOP
|
||||
|
@ -494,7 +494,7 @@ const Type *SubDNode::sub( const Type *t1, const Type *t2 ) const {
|
|||
// Unlike SubNodes, compare must still flatten return value to the
|
||||
// range -1, 0, 1.
|
||||
// And optimizations like those for (X + Y) - X fail if overflow happens.
|
||||
Node *CmpNode::Identity( PhaseTransform *phase ) {
|
||||
Node* CmpNode::Identity(PhaseGVN* phase) {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -611,7 +611,7 @@ const Type *CmpUNode::sub( const Type *t1, const Type *t2 ) const {
|
|||
return TypeInt::CC; // else use worst case results
|
||||
}
|
||||
|
||||
const Type* CmpUNode::Value(PhaseTransform *phase) const {
|
||||
const Type* CmpUNode::Value(PhaseGVN* phase) const {
|
||||
const Type* t = SubNode::Value_common(phase);
|
||||
if (t != NULL) {
|
||||
return t;
|
||||
|
@ -1053,7 +1053,7 @@ Node *CmpNNode::Ideal( PhaseGVN *phase, bool can_reshape ) {
|
|||
//------------------------------Value------------------------------------------
|
||||
// Simplify an CmpF (compare 2 floats ) node, based on local information.
|
||||
// If both inputs are constants, compare them.
|
||||
const Type *CmpFNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* CmpFNode::Value(PhaseGVN* phase) const {
|
||||
const Node* in1 = in(1);
|
||||
const Node* in2 = in(2);
|
||||
// Either input is TOP ==> the result is TOP
|
||||
|
@ -1083,7 +1083,7 @@ const Type *CmpFNode::Value( PhaseTransform *phase ) const {
|
|||
//------------------------------Value------------------------------------------
|
||||
// Simplify an CmpD (compare 2 doubles ) node, based on local information.
|
||||
// If both inputs are constants, compare them.
|
||||
const Type *CmpDNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* CmpDNode::Value(PhaseGVN* phase) const {
|
||||
const Node* in1 = in(1);
|
||||
const Node* in2 = in(2);
|
||||
// Either input is TOP ==> the result is TOP
|
||||
|
@ -1423,7 +1423,7 @@ Node *BoolNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
|||
//------------------------------Value------------------------------------------
|
||||
// Simplify a Bool (convert condition codes to boolean (1 or 0)) node,
|
||||
// based on local information. If the input is constant, do it.
|
||||
const Type *BoolNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* BoolNode::Value(PhaseGVN* phase) const {
|
||||
return _test.cc2logical( phase->type( in(1) ) );
|
||||
}
|
||||
|
||||
|
@ -1466,7 +1466,7 @@ bool BoolNode::is_counted_loop_exit_test() {
|
|||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
// Compute sqrt
|
||||
const Type *SqrtDNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* SqrtDNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
if( t1 == Type::TOP ) return Type::TOP;
|
||||
if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
|
||||
|
@ -1478,7 +1478,7 @@ const Type *SqrtDNode::Value( PhaseTransform *phase ) const {
|
|||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
// Compute tan
|
||||
const Type *TanDNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* TanDNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
if( t1 == Type::TOP ) return Type::TOP;
|
||||
if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
|
||||
|
@ -1489,7 +1489,7 @@ const Type *TanDNode::Value( PhaseTransform *phase ) const {
|
|||
//=============================================================================
|
||||
//------------------------------Value------------------------------------------
|
||||
// Compute log10
|
||||
const Type *Log10DNode::Value( PhaseTransform *phase ) const {
|
||||
const Type* Log10DNode::Value(PhaseGVN* phase) const {
|
||||
const Type *t1 = phase->type( in(1) );
|
||||
if( t1 == Type::TOP ) return Type::TOP;
|
||||
if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
|
||||
|
|
|
@ -45,11 +45,11 @@ public:
|
|||
|
||||
// Handle algebraic identities here. If we have an identity, return the Node
|
||||
// we are equivalent to. We look for "add of zero" as an identity.
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
|
||||
// Compute a new Type for this node. Basically we just do the pre-check,
|
||||
// then call the virtual add() to set the type.
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
const Type* Value_common( PhaseTransform *phase ) const;
|
||||
|
||||
// Supplied function returns the subtractend of the inputs.
|
||||
|
@ -97,7 +97,7 @@ class SubFPNode : public SubNode {
|
|||
protected:
|
||||
SubFPNode( Node *in1, Node *in2 ) : SubNode(in1,in2) {}
|
||||
public:
|
||||
const Type *Value( PhaseTransform *phase ) const;
|
||||
const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
// NOTE: SubFNode should be taken away and replaced by add and negate
|
||||
|
@ -135,7 +135,7 @@ public:
|
|||
CmpNode( Node *in1, Node *in2 ) : SubNode(in1,in2) {
|
||||
init_class_id(Class_Cmp);
|
||||
}
|
||||
virtual Node *Identity( PhaseTransform *phase );
|
||||
virtual Node* Identity(PhaseGVN* phase);
|
||||
const Type *add_id() const { return TypeInt::ZERO; }
|
||||
const Type *bottom_type() const { return TypeInt::CC; }
|
||||
virtual uint ideal_reg() const { return Op_RegFlags; }
|
||||
|
@ -165,7 +165,7 @@ public:
|
|||
CmpUNode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *sub( const Type *, const Type * ) const;
|
||||
const Type *Value( PhaseTransform *phase ) const;
|
||||
const Type* Value(PhaseGVN* phase) const;
|
||||
bool is_index_range_check() const;
|
||||
};
|
||||
|
||||
|
@ -219,7 +219,7 @@ public:
|
|||
CmpFNode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *sub( const Type *, const Type * ) const { ShouldNotReachHere(); return NULL; }
|
||||
const Type *Value( PhaseTransform *phase ) const;
|
||||
const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
//------------------------------CmpF3Node--------------------------------------
|
||||
|
@ -247,7 +247,7 @@ public:
|
|||
CmpDNode( Node *in1, Node *in2 ) : CmpNode(in1,in2) {}
|
||||
virtual int Opcode() const;
|
||||
virtual const Type *sub( const Type *, const Type * ) const { ShouldNotReachHere(); return NULL; }
|
||||
const Type *Value( PhaseTransform *phase ) const;
|
||||
const Type* Value(PhaseGVN* phase) const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
};
|
||||
|
||||
|
@ -309,7 +309,7 @@ public:
|
|||
BoolNode* negate(PhaseGVN* phase);
|
||||
virtual int Opcode() const;
|
||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
virtual const Type *bottom_type() const { return TypeInt::BOOL; }
|
||||
uint match_edge(uint idx) const { return 0; }
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
|
@ -419,7 +419,7 @@ public:
|
|||
virtual int Opcode() const;
|
||||
const Type *bottom_type() const { return Type::DOUBLE; }
|
||||
virtual uint ideal_reg() const { return Op_RegD; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
|
||||
|
@ -445,7 +445,7 @@ public:
|
|||
virtual int Opcode() const;
|
||||
const Type *bottom_type() const { return Type::DOUBLE; }
|
||||
virtual uint ideal_reg() const { return Op_RegD; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
//------------------------------Log10DNode---------------------------------------
|
||||
|
@ -459,7 +459,7 @@ public:
|
|||
virtual int Opcode() const;
|
||||
const Type *bottom_type() const { return Type::DOUBLE; }
|
||||
virtual uint ideal_reg() const { return Op_RegD; }
|
||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||
virtual const Type* Value(PhaseGVN* phase) const;
|
||||
};
|
||||
|
||||
//-------------------------------ReverseBytesINode--------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue