< prev index next >
src/share/vm/opto/mulnode.cpp
Print this page
@@ -44,11 +44,11 @@
return (uintptr_t)in(1) + (uintptr_t)in(2) + Opcode();
}
//------------------------------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);
return this;
@@ -137,11 +137,11 @@
return progress;
}
//------------------------------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
if( t1 == Type::TOP ) return Type::TOP;
if( t2 == Type::TOP ) return Type::TOP;
@@ -379,11 +379,11 @@
return TypeD::make( t0->getd() * t1->getd() );
}
//=============================================================================
//------------------------------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) );
if( t1 == Type::TOP ) return Type::TOP;
if( t2 == Type::TOP ) return Type::TOP;
@@ -430,11 +430,11 @@
return TypeInt::INT; // No constants to be had
}
//------------------------------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);
Node* in1 = in(1);
@@ -560,11 +560,11 @@
return TypeLong::LONG; // No constants to be had
}
//------------------------------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);
Node *usr = in(1);
@@ -637,11 +637,11 @@
return MulNode::Ideal(phase, 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;
}
//------------------------------Ideal------------------------------------------
@@ -702,11 +702,11 @@
return NULL;
}
//------------------------------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
if( t1 == Type::TOP ) return Type::TOP;
if( t2 == Type::TOP ) return Type::TOP;
@@ -749,11 +749,11 @@
return TypeInt::make( (jint)r1->get_con() << (jint)shift );
}
//=============================================================================
//------------------------------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;
}
//------------------------------Ideal------------------------------------------
@@ -811,11 +811,11 @@
return NULL;
}
//------------------------------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
if( t1 == Type::TOP ) return Type::TOP;
if( t2 == Type::TOP ) return Type::TOP;
@@ -858,11 +858,11 @@
return TypeLong::make( (jlong)r1->get_con() << (jint)shift );
}
//=============================================================================
//------------------------------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 )
return in(1);
@@ -957,11 +957,11 @@
return NULL;
}
//------------------------------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
if( t1 == Type::TOP ) return Type::TOP;
if( t2 == Type::TOP ) return Type::TOP;
@@ -1012,18 +1012,18 @@
return TypeInt::make( r1->get_con() >> (r2->get_con()&31) );
}
//=============================================================================
//------------------------------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
if( t1 == Type::TOP ) return Type::TOP;
if( t2 == Type::TOP ) return Type::TOP;
@@ -1070,11 +1070,11 @@
return TypeLong::LONG; // Give up
}
//=============================================================================
//------------------------------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);
// Check for "((x << LogBytesPerWord) + (wordSize-1)) >> LogBytesPerWord" which is just "x".
// Happens during new-array length computation.
@@ -1166,11 +1166,11 @@
return NULL;
}
//------------------------------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) );
// Either input is TOP ==> the result is TOP
if( t1 == Type::TOP ) return Type::TOP;
@@ -1240,11 +1240,11 @@
return TypeInt::INT;
}
//=============================================================================
//------------------------------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;
}
//------------------------------Ideal------------------------------------------
@@ -1295,11 +1295,11 @@
return NULL;
}
//------------------------------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) );
// Either input is TOP ==> the result is TOP
if( t1 == Type::TOP ) return Type::TOP;
< prev index next >