--- old/src/share/vm/opto/convertnode.cpp 2016-07-11 22:46:20.930466957 +0900 +++ new/src/share/vm/opto/convertnode.cpp 2016-07-11 22:46:20.794467433 +0900 @@ -77,7 +77,7 @@ // 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(PhaseGVN* phase) { - return (in(1)->Opcode() == Op_ConvF2D) ? in(1)->in(1) : this; + return (in(1)->Opcode() == Opcodes::Op_ConvF2D) ? in(1)->in(1) : this; } //============================================================================= @@ -93,7 +93,7 @@ //------------------------------Ideal------------------------------------------ // If converting to an int type, skip any rounding nodes Node *ConvD2INode::Ideal(PhaseGVN *phase, bool can_reshape) { - if( in(1)->Opcode() == Op_RoundDouble ) + if( in(1)->Opcode() == Opcodes::Op_RoundDouble ) set_req(1,in(1)->in(1)); return NULL; } @@ -102,7 +102,7 @@ // 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(PhaseGVN* phase) { - return (in(1)->Opcode() == Op_ConvI2D) ? in(1)->in(1) : this; + return (in(1)->Opcode() == Opcodes::Op_ConvI2D) ? in(1)->in(1) : this; } //============================================================================= @@ -118,8 +118,8 @@ //------------------------------Identity--------------------------------------- Node* ConvD2LNode::Identity(PhaseGVN* phase) { // Remove ConvD2L->ConvL2D->ConvD2L sequences. - if( in(1) ->Opcode() == Op_ConvL2D && - in(1)->in(1)->Opcode() == Op_ConvD2L ) + if( in(1) ->Opcode() == Opcodes::Op_ConvL2D && + in(1)->in(1)->Opcode() == Opcodes::Op_ConvD2L ) return in(1)->in(1); return this; } @@ -127,7 +127,7 @@ //------------------------------Ideal------------------------------------------ // If converting to an int type, skip any rounding nodes Node *ConvD2LNode::Ideal(PhaseGVN *phase, bool can_reshape) { - if( in(1)->Opcode() == Op_RoundDouble ) + if( in(1)->Opcode() == Opcodes::Op_RoundDouble ) set_req(1,in(1)->in(1)); return NULL; } @@ -155,8 +155,8 @@ //------------------------------Identity--------------------------------------- Node* ConvF2INode::Identity(PhaseGVN* phase) { // Remove ConvF2I->ConvI2F->ConvF2I sequences. - if( in(1) ->Opcode() == Op_ConvI2F && - in(1)->in(1)->Opcode() == Op_ConvF2I ) + if( in(1) ->Opcode() == Opcodes::Op_ConvI2F && + in(1)->in(1)->Opcode() == Opcodes::Op_ConvF2I ) return in(1)->in(1); return this; } @@ -164,7 +164,7 @@ //------------------------------Ideal------------------------------------------ // If converting to an int type, skip any rounding nodes Node *ConvF2INode::Ideal(PhaseGVN *phase, bool can_reshape) { - if( in(1)->Opcode() == Op_RoundFloat ) + if( in(1)->Opcode() == Opcodes::Op_RoundFloat ) set_req(1,in(1)->in(1)); return NULL; } @@ -182,8 +182,8 @@ //------------------------------Identity--------------------------------------- Node* ConvF2LNode::Identity(PhaseGVN* phase) { // Remove ConvF2L->ConvL2F->ConvF2L sequences. - if( in(1) ->Opcode() == Op_ConvL2F && - in(1)->in(1)->Opcode() == Op_ConvF2L ) + if( in(1) ->Opcode() == Opcodes::Op_ConvL2F && + in(1)->in(1)->Opcode() == Opcodes::Op_ConvF2L ) return in(1)->in(1); return this; } @@ -191,7 +191,7 @@ //------------------------------Ideal------------------------------------------ // If converting to an int type, skip any rounding nodes Node *ConvF2LNode::Ideal(PhaseGVN *phase, bool can_reshape) { - if( in(1)->Opcode() == Op_RoundFloat ) + if( in(1)->Opcode() == Opcodes::Op_RoundFloat ) set_req(1,in(1)->in(1)); return NULL; } @@ -219,8 +219,8 @@ //------------------------------Identity--------------------------------------- Node* ConvI2FNode::Identity(PhaseGVN* phase) { // Remove ConvI2F->ConvF2I->ConvI2F sequences. - if( in(1) ->Opcode() == Op_ConvF2I && - in(1)->in(1)->Opcode() == Op_ConvI2F ) + if( in(1) ->Opcode() == Opcodes::Op_ConvF2I && + in(1)->in(1)->Opcode() == Opcodes::Op_ConvI2F ) return in(1)->in(1); return this; } @@ -318,15 +318,15 @@ // Addressing arithmetic will not absorb it as part of a 64-bit AddL. Node* z = in(1); - int op = z->Opcode(); + Opcodes op = z->Opcode(); Node* ctrl = NULL; - if (op == Op_CastII && z->as_CastII()->has_range_check()) { + if (op == Opcodes::Op_CastII && z->as_CastII()->has_range_check()) { // Skip CastII node but save control dependency ctrl = z->in(0); z = z->in(1); op = z->Opcode(); } - if (op == Op_AddI || op == Op_SubI) { + if (op == Opcodes::Op_AddI || op == Opcodes::Op_SubI) { Node* x = z->in(1); Node* y = z->in(2); assert (x != z && y != z, "dead loop in ConvI2LNode::Ideal"); @@ -343,7 +343,7 @@ jlong zhi = tz->_hi; jlong vbit = CONST64(1) << BitsPerInt; int widen = MAX2(tx->_widen, ty->_widen); - if (op == Op_SubI) { + if (op == Opcodes::Op_SubI) { jlong ylo0 = ylo; ylo = -yhi; yhi = -ylo0; @@ -378,7 +378,7 @@ if (rxlo > rxhi || rylo > ryhi) { return this_changed; // x or y is dying; don't mess w/ it } - if (op == Op_SubI) { + if (op == Opcodes::Op_SubI) { jlong rylo0 = rylo; rylo = -ryhi; ryhi = -rylo0; @@ -388,8 +388,8 @@ Node* cx = phase->C->constrained_convI2L(phase, x, TypeInt::make(rxlo, rxhi, widen), ctrl); Node* cy = phase->C->constrained_convI2L(phase, y, TypeInt::make(rylo, ryhi, widen), ctrl); switch (op) { - case Op_AddI: return new AddLNode(cx, cy); - case Op_SubI: return new SubLNode(cx, cy); + case Opcodes::Op_AddI: return new AddLNode(cx, cy); + case Opcodes::Op_SubI: return new SubLNode(cx, cy); default: ShouldNotReachHere(); } } @@ -422,7 +422,7 @@ //----------------------------Identity----------------------------------------- Node* ConvL2INode::Identity(PhaseGVN* phase) { // Convert L2I(I2L(x)) => x - if (in(1)->Opcode() == Op_ConvI2L) return in(1)->in(1); + if (in(1)->Opcode() == Opcodes::Op_ConvI2L) return in(1)->in(1); return this; } @@ -442,8 +442,8 @@ // Blow off prior masking to int Node *ConvL2INode::Ideal(PhaseGVN *phase, bool can_reshape) { Node *andl = in(1); - uint andl_op = andl->Opcode(); - if( andl_op == Op_AndL ) { + Opcodes andl_op = andl->Opcode(); + if( andl_op == Opcodes::Op_AndL ) { // Blow off prior masking to int if( phase->type(andl->in(2)) == TypeLong::make( 0xFFFFFFFF ) ) { set_req(1,andl->in(1)); @@ -453,7 +453,7 @@ // Swap with a prior add: convL2I(addL(x,y)) ==> addI(convL2I(x),convL2I(y)) // This replaces an 'AddL' with an 'AddI'. - if( andl_op == Op_AddL ) { + if( andl_op == Opcodes::Op_AddL ) { // Don't do this for nodes which have more than one user since // we'll end up computing the long add anyway. if (andl->outcnt() > 1) return NULL; @@ -483,12 +483,12 @@ 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); - int op = in(1)->Opcode(); + Opcodes op = in(1)->Opcode(); // Redundant rounding - if( op == Op_RoundFloat ) return in(1); + if( op == Opcodes::Op_RoundFloat ) return in(1); // Already rounded - if( op == Op_Parm ) return in(1); - if( op == Op_LoadF ) return in(1); + if( op == Opcodes::Op_Parm ) return in(1); + if( op == Opcodes::Op_LoadF ) return in(1); return this; } @@ -504,14 +504,14 @@ 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); - int op = in(1)->Opcode(); + Opcodes op = in(1)->Opcode(); // Redundant rounding - if( op == Op_RoundDouble ) return in(1); + if( op == Opcodes::Op_RoundDouble ) return in(1); // Already rounded - if( op == Op_Parm ) return in(1); - if( op == Op_LoadD ) return in(1); - if( op == Op_ConvF2D ) return in(1); - if( op == Op_ConvI2D ) return in(1); + if( op == Opcodes::Op_Parm ) return in(1); + if( op == Opcodes::Op_LoadD ) return in(1); + if( op == Opcodes::Op_ConvF2D ) return in(1); + if( op == Opcodes::Op_ConvI2D ) return in(1); return this; }