--- old/src/share/vm/opto/cfgnode.cpp 2016-07-11 22:46:16.335483045 +0900 +++ new/src/share/vm/opto/cfgnode.cpp 2016-07-11 22:46:16.195483535 +0900 @@ -72,7 +72,7 @@ // If a Region flows into a Region, merge into one big happy merge. This is // hard to do if there is stuff that has to happen static Node *merge_region(RegionNode *region, PhaseGVN *phase) { - if( region->Opcode() != Op_Region ) // Do not do to LoopNodes + if( region->Opcode() != Opcodes::Op_Region ) // Do not do to LoopNodes return NULL; Node *progress = NULL; // Progress flag PhaseIterGVN *igvn = phase->is_IterGVN(); @@ -80,7 +80,7 @@ uint rreq = region->req(); for( uint i = 1; i < rreq; i++ ) { Node *r = region->in(i); - if( r && r->Opcode() == Op_Region && // Found a region? + if( r && r->Opcode() == Opcodes::Op_Region && // Found a region? r->in(0) == r && // Not already collapsed? r != region && // Avoid stupid situations r->outcnt() == 2 ) { // Self user and 'region' user only? @@ -171,15 +171,15 @@ if( phi_max == 4 ) { for( uint j = 1; j < phi_max; ++j ) { Node *n = phi->in(j); - int opcode = n->Opcode(); + Opcodes opcode = n->Opcode(); switch( opcode ) { - case Op_ConI: + case Opcodes::Op_ConI: { if( min == NULL ) { - min = n->Opcode() == Op_ConI ? (ConNode*)n : NULL; + min = n->Opcode() == Opcodes::Op_ConI ? (ConNode*)n : NULL; min_idx = j; } else { - max = n->Opcode() == Op_ConI ? (ConNode*)n : NULL; + max = n->Opcode() == Opcodes::Op_ConI ? (ConNode*)n : NULL; max_idx = j; if( min->get_int() > max->get_int() ) { // Swap min and max @@ -258,16 +258,16 @@ // Check for the RShiftNode Node *rshift = phi->in(idx); assert( rshift, "Previous checks ensure phi input is present"); - if( rshift->Opcode() != Op_RShiftI ) { return false; } + if( rshift->Opcode() != Opcodes::Op_RShiftI ) { return false; } // Check for the LShiftNode Node *lshift = rshift->in(1); assert( lshift, "Previous checks ensure phi input is present"); - if( lshift->Opcode() != Op_LShiftI ) { return false; } + if( lshift->Opcode() != Opcodes::Op_LShiftI ) { return false; } // Check for the ConvF2INode Node *conv = lshift->in(1); - if( conv->Opcode() != Op_ConvF2I ) { return false; } + if( conv->Opcode() != Opcodes::Op_ConvF2I ) { return false; } // Check that shift amounts are only to get sign bits set after F2I jint max_cutoff = max->get_int(); @@ -298,11 +298,11 @@ if( less_than && bool1->_test._test != BoolTest::le ) { return false; } else if( !less_than && bool1->_test._test != BoolTest::lt ) { return false; } const Node *cmpF = bool1->in(1); - if( cmpF->Opcode() != Op_CmpF ) { return false; } + if( cmpF->Opcode() != Opcodes::Op_CmpF ) { return false; } // Test that the float value being compared against // is equivalent to the int value used as a limit Node *nodef = cmpF->in(2); - if( nodef->Opcode() != Op_ConF ) { return false; } + if( nodef->Opcode() != Opcodes::Op_ConF ) { return false; } jfloat conf = nodef->getf(); jint coni = limit->get_int(); if( ((int)conf) != coni ) { return false; } @@ -1105,11 +1105,11 @@ if( !cmp->is_Cmp() ) return 0; // Check for branching opposite expected - if( ifp2->Opcode() == Op_IfTrue ) { - assert( ifp1->Opcode() == Op_IfFalse, "" ); + if( ifp2->Opcode() == Opcodes::Op_IfTrue ) { + assert( ifp1->Opcode() == Opcodes::Op_IfFalse, "" ); return 2; } else { - assert( ifp1->Opcode() == Op_IfTrue, "" ); + assert( ifp1->Opcode() == Opcodes::Op_IfTrue, "" ); return 1; } } @@ -1321,15 +1321,15 @@ // Check for "(P < Q)" of type signed int if (b->_test._test != BoolTest::lt) return NULL; - if (cmp->Opcode() != Op_CmpI) return NULL; + if (cmp->Opcode() != Opcodes::Op_CmpI) return NULL; Node *p = cmp->in(1); Node *q = cmp->in(2); Node *n1 = phi->in( true_path); Node *n2 = phi->in(3-true_path); - int op = n1->Opcode(); - if( op != Op_AddI // Need zero as additive identity + Opcodes op = n1->Opcode(); + if( op != Opcodes::Op_AddI // Need zero as additive identity /*&&op != Op_SubI && op != Op_AddP && op != Op_XorI && @@ -1382,8 +1382,8 @@ Node *cmp = bol->in(1); const Type *tzero = NULL; switch( cmp->Opcode() ) { - case Op_CmpF: tzero = TypeF::ZERO; break; // Float ABS - case Op_CmpD: tzero = TypeD::ZERO; break; // Double ABS + case Opcodes::Op_CmpF: tzero = TypeF::ZERO; break; // Float ABS + case Opcodes::Op_CmpD: tzero = TypeD::ZERO; break; // Double ABS default: return NULL; } @@ -1409,7 +1409,7 @@ // Allow only Sub(0,X) and fail out for all others; Neg is not OK if( tzero == TypeF::ZERO ) { - if( sub->Opcode() != Op_SubF || + if( sub->Opcode() != Opcodes::Op_SubF || sub->in(2) != x || phase->type(sub->in(1)) != tzero ) return NULL; x = new AbsFNode(x); @@ -1417,7 +1417,7 @@ x = new SubFNode(sub->in(1), phase->transform(x)); } } else { - if( sub->Opcode() != Op_SubD || + if( sub->Opcode() != Opcodes::Op_SubD || sub->in(2) != x || phase->type(sub->in(1)) != tzero ) return NULL; x = new AbsDNode(x); @@ -1468,7 +1468,7 @@ Node *n = phi->in(i); if( !n ) return NULL; if( phase->type(n) == Type::TOP ) return NULL; - if( n->Opcode() == Op_ConP || n->Opcode() == Op_ConN || n->Opcode() == Op_ConNKlass ) + if( n->Opcode() == Opcodes::Op_ConP || n->Opcode() == Opcodes::Op_ConN || n->Opcode() == Opcodes::Op_ConNKlass ) break; } if( i >= phi->req() ) // Only split for constants @@ -1708,17 +1708,17 @@ assert(can_reshape, "Invalid during parsing"); const Type* phi_type = bottom_type(); assert(phi_type->isa_int() || phi_type->isa_ptr(), "bad phi type"); - int opcode; + Opcodes opcode; // Determine the type of cast to be added. if (phi_type->isa_int()) { - opcode = Op_CastII; + opcode = Opcodes::Op_CastII; } else { const Type* uin_type = phase->type(uin); if ((phi_type->join(TypePtr::NOTNULL) == uin_type->join(TypePtr::NOTNULL)) || (!phi_type->isa_oopptr() && !uin_type->isa_oopptr())) { - opcode = Op_CastPP; + opcode = Opcodes::Op_CastPP; } else { - opcode = Op_CheckCastPP; + opcode = Opcodes::Op_CheckCastPP; } } // Add a cast to carry the control dependency of the Phi that is @@ -1797,7 +1797,7 @@ if (opt != NULL) return opt; } - if (in(1) != NULL && in(1)->Opcode() == Op_AddP && can_reshape) { + if (in(1) != NULL && in(1)->Opcode() == Opcodes::Op_AddP && can_reshape) { // Try to undo Phi of AddP: // (Phi (AddP base base y) (AddP base2 base2 y)) // becomes: @@ -1816,7 +1816,7 @@ bool doit = true; for (uint i = 2; i < req(); i++) { if (in(i) == NULL || - in(i)->Opcode() != Op_AddP || + in(i)->Opcode() != Opcodes::Op_AddP || in(i)->in(AddPNode::Base) != in(i)->in(AddPNode::Address) || in(i)->in(AddPNode::Offset) != y) { doit = false; @@ -2072,10 +2072,10 @@ } const RegMask &PhiNode::out_RegMask() const { - uint ideal_reg = _type->ideal_reg(); - assert( ideal_reg != Node::NotAMachineReg, "invalid type at Phi" ); - if( ideal_reg == 0 ) return RegMask::Empty; - return *(Compile::current()->matcher()->idealreg2spillmask[ideal_reg]); + Opcodes ideal_reg = _type->ideal_reg(); + assert( ideal_reg != Opcodes::NotAMachineReg, "invalid type at Phi" ); + if( ideal_reg == Opcodes::Op_Node ) return RegMask::Empty; + return *(Compile::current()->matcher()->idealreg2spillmask[static_cast(ideal_reg)]); } #ifndef PRODUCT