< prev index next >
src/share/vm/opto/divnode.cpp
Print this page
*** 455,465 ****
}
//=============================================================================
//------------------------------Identity---------------------------------------
// If the divisor is 1, we are an identity on the dividend.
! Node *DivINode::Identity( PhaseTransform *phase ) {
return (phase->type( in(2) )->higher_equal(TypeInt::ONE)) ? in(1) : this;
}
//------------------------------Idealize---------------------------------------
// Divides can be changed to multiplies and/or shifts
--- 455,465 ----
}
//=============================================================================
//------------------------------Identity---------------------------------------
// If the divisor is 1, we are an identity on the dividend.
! Node* DivINode::Identity(PhaseGVN* phase) {
return (phase->type( in(2) )->higher_equal(TypeInt::ONE)) ? in(1) : this;
}
//------------------------------Idealize---------------------------------------
// Divides can be changed to multiplies and/or shifts
*** 491,501 ****
}
//------------------------------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 {
// 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;
--- 491,501 ----
}
//------------------------------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(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;
*** 557,567 ****
//=============================================================================
//------------------------------Identity---------------------------------------
// If the divisor is 1, we are an identity on the dividend.
! Node *DivLNode::Identity( PhaseTransform *phase ) {
return (phase->type( in(2) )->higher_equal(TypeLong::ONE)) ? in(1) : this;
}
//------------------------------Idealize---------------------------------------
// Dividing by a power of 2 is a shift.
--- 557,567 ----
//=============================================================================
//------------------------------Identity---------------------------------------
// If the divisor is 1, we are an identity on the dividend.
! Node* DivLNode::Identity(PhaseGVN* phase) {
return (phase->type( in(2) )->higher_equal(TypeLong::ONE)) ? in(1) : this;
}
//------------------------------Idealize---------------------------------------
// Dividing by a power of 2 is a shift.
*** 593,603 ****
}
//------------------------------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 {
// 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;
--- 593,603 ----
}
//------------------------------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(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;
*** 660,670 ****
//=============================================================================
//------------------------------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 {
// 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;
--- 660,670 ----
//=============================================================================
//------------------------------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(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;
*** 703,713 ****
}
//------------------------------isA_Copy---------------------------------------
// Dividing by self is 1.
// If the divisor is 1, we are an identity on the dividend.
! Node *DivFNode::Identity( PhaseTransform *phase ) {
return (phase->type( in(2) ) == TypeF::ONE) ? in(1) : this;
}
//------------------------------Idealize---------------------------------------
--- 703,713 ----
}
//------------------------------isA_Copy---------------------------------------
// Dividing by self is 1.
// If the divisor is 1, we are an identity on the dividend.
! Node* DivFNode::Identity(PhaseGVN* phase) {
return (phase->type( in(2) ) == TypeF::ONE) ? in(1) : this;
}
//------------------------------Idealize---------------------------------------
*** 748,758 ****
//=============================================================================
//------------------------------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 {
// 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;
--- 748,758 ----
//=============================================================================
//------------------------------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(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;
*** 798,808 ****
//------------------------------isA_Copy---------------------------------------
// Dividing by self is 1.
// If the divisor is 1, we are an identity on the dividend.
! Node *DivDNode::Identity( PhaseTransform *phase ) {
return (phase->type( in(2) ) == TypeD::ONE) ? in(1) : this;
}
//------------------------------Idealize---------------------------------------
Node *DivDNode::Ideal(PhaseGVN *phase, bool can_reshape) {
--- 798,808 ----
//------------------------------isA_Copy---------------------------------------
// Dividing by self is 1.
// If the divisor is 1, we are an identity on the dividend.
! Node* DivDNode::Identity(PhaseGVN* phase) {
return (phase->type( in(2) ) == TypeD::ONE) ? in(1) : this;
}
//------------------------------Idealize---------------------------------------
Node *DivDNode::Ideal(PhaseGVN *phase, bool can_reshape) {
*** 970,980 ****
// return the value
return result;
}
//------------------------------Value------------------------------------------
! const Type *ModINode::Value( PhaseTransform *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;
--- 970,980 ----
// return the value
return result;
}
//------------------------------Value------------------------------------------
! 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) );
if( t1 == Type::TOP ) return Type::TOP;
if( t2 == Type::TOP ) return Type::TOP;
*** 1143,1153 ****
// return the value
return result;
}
//------------------------------Value------------------------------------------
! const Type *ModLNode::Value( PhaseTransform *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;
--- 1143,1153 ----
// return the value
return result;
}
//------------------------------Value------------------------------------------
! 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) );
if( t1 == Type::TOP ) return Type::TOP;
if( t2 == Type::TOP ) return Type::TOP;
*** 1184,1194 ****
}
//=============================================================================
//------------------------------Value------------------------------------------
! const Type *ModFNode::Value( PhaseTransform *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;
--- 1184,1194 ----
}
//=============================================================================
//------------------------------Value------------------------------------------
! 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) );
if( t1 == Type::TOP ) return Type::TOP;
if( t2 == Type::TOP ) return Type::TOP;
*** 1228,1238 ****
}
//=============================================================================
//------------------------------Value------------------------------------------
! const Type *ModDNode::Value( PhaseTransform *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;
--- 1228,1238 ----
}
//=============================================================================
//------------------------------Value------------------------------------------
! 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) );
if( t1 == Type::TOP ) return Type::TOP;
if( t2 == Type::TOP ) return Type::TOP;
< prev index next >