< prev index next >
src/share/vm/opto/subnode.cpp
Print this page
@@ -44,11 +44,11 @@
#include "math.h"
//=============================================================================
//------------------------------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");
// Remove double negation
const Type *zero = add_id();
@@ -98,11 +98,11 @@
return bottom_type();
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;
}
const Type* t1 = phase->type(in(1));
@@ -376,11 +376,11 @@
}
//=============================================================================
//------------------------------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
const Type* t1 = (in1 == this) ? Type::TOP : phase->type(in1);
if( t1 == Type::TOP ) return Type::TOP;
@@ -492,11 +492,11 @@
//=============================================================================
//------------------------------Idealize---------------------------------------
// 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;
}
#ifndef PRODUCT
//----------------------------related------------------------------------------
@@ -609,11 +609,11 @@
if ((jint)lo0 >= 0 && (jint)lo1 >= 0 && is_index_range_check())
return TypeInt::CC_LT;
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;
}
const Node* in1 = in(1);
@@ -1051,11 +1051,11 @@
//=============================================================================
//------------------------------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
const Type* t1 = (in1 == this) ? Type::TOP : phase->type(in1);
if( t1 == Type::TOP ) return Type::TOP;
@@ -1081,11 +1081,11 @@
//=============================================================================
//------------------------------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
const Type* t1 = (in1 == this) ? Type::TOP : phase->type(in1);
if( t1 == Type::TOP ) return Type::TOP;
@@ -1421,11 +1421,11 @@
}
//------------------------------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) ) );
}
#ifndef PRODUCT
//------------------------------dump_spec--------------------------------------
@@ -1464,11 +1464,11 @@
}
//=============================================================================
//------------------------------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;
double d = t1->getd();
if( d < 0.0 ) return Type::DOUBLE;
@@ -1476,44 +1476,44 @@
}
//=============================================================================
//------------------------------Value------------------------------------------
// Compute cos
-const Type *CosDNode::Value( PhaseTransform *phase ) const {
+const Type* CosDNode::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;
double d = t1->getd();
return TypeD::make( StubRoutines::intrinsic_cos( d ) );
}
//=============================================================================
//------------------------------Value------------------------------------------
// Compute sin
-const Type *SinDNode::Value( PhaseTransform *phase ) const {
+const Type* SinDNode::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;
double d = t1->getd();
return TypeD::make( StubRoutines::intrinsic_sin( d ) );
}
//=============================================================================
//------------------------------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;
double d = t1->getd();
return TypeD::make( StubRoutines::intrinsic_tan( d ) );
}
//=============================================================================
//------------------------------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;
double d = t1->getd();
return TypeD::make( StubRoutines::intrinsic_log10( d ) );
< prev index next >