< prev index next >
src/share/vm/opto/addnode.cpp
Print this page
@@ -50,11 +50,11 @@
return (uintptr_t)in(1) + (uintptr_t)in(2) + Opcode();
}
//------------------------------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);
return this;
}
@@ -202,11 +202,11 @@
}
//------------------------------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) );
if( t1 == Type::TOP ) return Type::TOP;
if( t2 == Type::TOP ) return Type::TOP;
@@ -324,11 +324,11 @@
}
//------------------------------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);
}
else if( in(2)->Opcode() == Op_SubI && phase->eqv(in(2)->in(2),in(1)) ) {
return in(2)->in(1);
@@ -441,11 +441,11 @@
}
//------------------------------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);
}
else if( in(2)->Opcode() == Op_SubL && phase->eqv(in(2)->in(2),in(1)) ) {
return in(2)->in(1);
@@ -559,11 +559,11 @@
//=============================================================================
//------------------------------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;
}
//------------------------------Idealize---------------------------------------
Node *AddPNode::Ideal(PhaseGVN *phase, bool can_reshape) {
@@ -657,11 +657,11 @@
}
return tp->add_offset(txoffset);
}
//------------------------------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) );
if( t1 == Type::TOP ) return Type::TOP;
if( t2 == Type::TOP ) return Type::TOP;
@@ -731,11 +731,11 @@
return idx > Base;
}
//=============================================================================
//------------------------------Identity---------------------------------------
-Node *OrINode::Identity( PhaseTransform *phase ) {
+Node* OrINode::Identity(PhaseGVN* phase) {
// x | x => x
if (phase->eqv(in(1), in(2))) {
return in(1);
}
@@ -772,11 +772,11 @@
return TypeInt::make( r0->get_con() | r1->get_con() );
}
//=============================================================================
//------------------------------Identity---------------------------------------
-Node *OrLNode::Identity( PhaseTransform *phase ) {
+Node* OrLNode::Identity(PhaseGVN* phase) {
// x | x => x
if (phase->eqv(in(1), in(2))) {
return in(1);
}
< prev index next >