--- old/src/share/vm/opto/ifnode.cpp 2016-07-11 22:46:28.336441027 +0900 +++ new/src/share/vm/opto/ifnode.cpp 2016-07-11 22:46:28.196441518 +0900 @@ -365,9 +365,9 @@ for (DUIterator_Last i2min, i2 = phi->last_outs(i2min); i2 >= i2min; --i2) { Node* v = phi->last_out(i2);// User of the phi igvn->rehash_node_delayed(v); // Have to fixup other Phi users - uint vop = v->Opcode(); + Opcodes vop = v->Opcode(); Node *proj = NULL; - if( vop == Op_Phi ) { // Remote merge point + if( vop == Opcodes::Op_Phi ) { // Remote merge point Node *r = v->in(0); for (uint i3 = 1; i3 < r->req(); i3++) if (r->in(i3) && r->in(i3)->in(0) == iff) { @@ -381,7 +381,7 @@ } Node *proj_path_data, *proj_path_ctrl; - if( proj->Opcode() == Op_IfTrue ) { + if( proj->Opcode() == Opcodes::Op_IfTrue ) { if( phi_s == NULL ) { // Only construct phi_s if needed, otherwise provides // interfering use. @@ -408,7 +408,7 @@ } // Fixup 'v' for for the split - if( vop == Op_Phi ) { // Remote merge point + if( vop == Opcodes::Op_Phi ) { // Remote merge point uint i; for( i = 1; i < v->req(); i++ ) if( v->in(i) == phi ) @@ -425,8 +425,8 @@ // This makes the original iff go dead. for (DUIterator_Last i3min, i3 = iff->last_outs(i3min); i3 >= i3min; --i3) { Node* p = iff->last_out(i3); - assert( p->Opcode() == Op_IfTrue || p->Opcode() == Op_IfFalse, "" ); - Node *u = (p->Opcode() == Op_IfTrue) ? region_s : region_f; + assert( p->Opcode() == Opcodes::Op_IfTrue || p->Opcode() == Opcodes::Op_IfFalse, "" ); + Node *u = (p->Opcode() == Opcodes::Op_IfTrue) ? region_s : region_f; // Replace p with u igvn->add_users_to_worklist(p); for (DUIterator_Last lmin, l = p->last_outs(lmin); l >= lmin;) { @@ -475,7 +475,7 @@ BoolNode* bn = b->as_Bool(); Node* cmp = bn->in(1); if (cmp == NULL) return NULL; - if (cmp->Opcode() != Op_CmpU) return NULL; + if (cmp->Opcode() != Opcodes::Op_CmpU) return NULL; l = cmp->in(1); r = cmp->in(2); @@ -488,7 +488,7 @@ return NULL; } if (l->is_top()) return NULL; // Top input means dead test - if (r->Opcode() != Op_LoadRange && !is_RangeCheck()) return NULL; + if (r->Opcode() != Opcodes::Op_LoadRange && !is_RangeCheck()) return NULL; // We have recognized one of these forms: // Flip 1: If (Bool[<] CmpU(l, LoadRange)) ... @@ -526,7 +526,7 @@ jint off = 0; if (l->is_top()) { return 0; - } else if (l->Opcode() == Op_AddI) { + } else if (l->Opcode() == Opcodes::Op_AddI) { if ((off = l->in(1)->find_int_con(0)) != 0) { ind = l->in(2)->uncast(); } else if ((off = l->in(2)->find_int_con(0)) != 0) { @@ -627,7 +627,7 @@ // Return a possibly more restrictive type for val based on condition control flow for an if const TypeInt* IfNode::filtered_int_type(PhaseGVN* gvn, Node *val, Node* if_proj) { assert(if_proj && - (if_proj->Opcode() == Op_IfTrue || if_proj->Opcode() == Op_IfFalse), "expecting an if projection"); + (if_proj->Opcode() == Opcodes::Op_IfTrue || if_proj->Opcode() == Opcodes::Op_IfFalse), "expecting an if projection"); if (if_proj->in(0) && if_proj->in(0)->is_If()) { IfNode* iff = if_proj->in(0)->as_If(); if (iff->in(1) && iff->in(1)->is_Bool()) { @@ -639,7 +639,7 @@ if (cmp2_t != NULL) { jint lo = cmp2_t->_lo; jint hi = cmp2_t->_hi; - BoolTest::mask msk = if_proj->Opcode() == Op_IfTrue ? bol->_test._test : bol->_test.negate(); + BoolTest::mask msk = if_proj->Opcode() == Opcodes::Op_IfTrue ? bol->_test._test : bol->_test.negate(); switch (msk) { case BoolTest::ne: // Can't refine type @@ -719,7 +719,7 @@ return in(1) != NULL && in(1)->is_Bool() && in(1)->in(1) != NULL && - in(1)->in(1)->Opcode() == Op_CmpI && + in(1)->in(1)->Opcode() == Opcodes::Op_CmpI && in(1)->in(1)->in(2) != NULL && in(1)->in(1)->in(2) != igvn->C->top() && (in(1)->as_Bool()->_test.is_less() || @@ -731,7 +731,7 @@ return ctrl != NULL && ctrl->is_Proj() && ctrl->in(0) != NULL && - ctrl->in(0)->Opcode() == Op_If && + ctrl->in(0)->Opcode() == Opcodes::Op_If && ctrl->in(0)->outcnt() == 2 && ctrl->in(0)->as_If()->cmpi_folds(igvn) && // Must compare same value @@ -1077,7 +1077,7 @@ ResourceMark rm; Node_Stack stack(2); - assert(r->Opcode() == Op_LoadRange, "unexpected range check"); + assert(r->Opcode() == Opcodes::Op_LoadRange, "unexpected range check"); const TypeInt* array_size = igvn->type(r)->is_int(); stack.push(l, 0); @@ -1090,7 +1090,7 @@ for (; i < n->outcnt(); i++) { Node* use = n->raw_out(i); if (stack.size() == 1) { - if (use->Opcode() == Op_ConvI2L) { + if (use->Opcode() == Opcodes::Op_ConvI2L) { const TypeLong* bounds = use->as_Type()->type()->is_long(); if (bounds->_lo <= array_size->_lo && bounds->_hi >= array_size->_hi && (bounds->_lo != array_size->_lo || bounds->_hi != array_size->_hi)) { @@ -1106,7 +1106,7 @@ } if (ctrl == fail) { Node* init_n = stack.node_at(1); - assert(init_n->Opcode() == Op_ConvI2L, "unexpected first node"); + assert(init_n->Opcode() == Opcodes::Op_ConvI2L, "unexpected first node"); // Create a new narrow ConvI2L node that is dependent on the range check Node* new_n = igvn->C->conv_I2X_index(igvn, l, array_size, fail); @@ -1150,13 +1150,13 @@ in(1)->in(1) != NULL && in(1)->in(1)->in(2) != NULL) { Node* other = in(1)->in(1)->in(2); - if (other->Opcode() == Op_LoadRange && + if (other->Opcode() == Opcodes::Op_LoadRange && ((other->in(0) != NULL && other->in(0) == proj) || (other->in(0) == NULL && other->in(2) != NULL && other->in(2)->is_AddP() && other->in(2)->in(1) != NULL && - other->in(2)->in(1)->Opcode() == Op_CastPP && + other->in(2)->in(1)->Opcode() == Opcodes::Op_CastPP && other->in(2)->in(1)->in(0) == proj))) { return true; } @@ -1170,7 +1170,7 @@ proj->in(0)->in(1) != NULL && proj->in(0)->in(1)->is_Bool() && proj->in(0)->in(1)->in(1) != NULL && - proj->in(0)->in(1)->in(1)->Opcode() == Op_CmpP && + proj->in(0)->in(1)->in(1)->Opcode() == Opcodes::Op_CmpP && proj->in(0)->in(1)->in(1)->in(2) != NULL && proj->in(0)->in(1)->in(1)->in(1) == other->in(MemNode::Address)->in(AddPNode::Address)->uncast() && igvn->type(proj->in(0)->in(1)->in(1)->in(2)) == TypePtr::NULL_PTR) { @@ -1240,7 +1240,7 @@ } Node* IfNode::fold_compares(PhaseIterGVN* igvn) { - if (Opcode() != Op_If) return NULL; + if (Opcode() != Opcodes::Op_If) return NULL; if (cmpi_folds(igvn)) { Node* ctrl = in(0); @@ -1295,7 +1295,7 @@ BoolNode *bol = i1->as_Bool(); Node *cmp = bol->in(1); - if( cmp->Opcode() != Op_CmpI ) return NULL; + if( cmp->Opcode() != Opcodes::Op_CmpI ) return NULL; // Must be comparing against a bool const Type *cmp2_t = phase->type( cmp->in(2) ); @@ -1411,9 +1411,9 @@ // Scan for an equivalent test Node *cmp; int dist = 0; // Cutoff limit for search - int op = Opcode(); - if( op == Op_If && - (cmp=in(1)->in(1))->Opcode() == Op_CmpP ) { + Opcodes op = Opcode(); + if( op == Opcodes::Op_If && + (cmp=in(1)->in(1))->Opcode() == Opcodes::Op_CmpP ) { if( cmp->in(2) != NULL && // make sure cmp is not already dead cmp->in(2)->bottom_type() == TypePtr::NULL_PTR ) { dist = 64; // Limit for null-pointer scans @@ -1451,7 +1451,7 @@ igvn->hash_delete(this); // Remove self to prevent spurious V-N Node *idom = in(0); // Need opcode to decide which way 'this' test goes - int prev_op = prev_dom->Opcode(); + Opcodes prev_op = prev_dom->Opcode(); Node *top = igvn->C->top(); // Shortcut to top // Loop predicates may have depending checks which should not @@ -1505,7 +1505,7 @@ // Setup to scan up the CFG looking for a dominating test Node* dom = in(0); Node* prev_dom = this; - int op = Opcode(); + Opcodes op = Opcode(); // Search up the dominator tree for an If with an identical test while (dom->Opcode() != op || // Not same opcode? dom->in(1) != in(1) || // Not same input 1? @@ -1690,7 +1690,7 @@ // Scan for the top checks and collect range of offsets for (int dist = 0; dist < 999; dist++) { // Range-Check scan limit - if (dom->Opcode() == Op_RangeCheck && // Not same opcode? + if (dom->Opcode() == Opcodes::Op_RangeCheck && // Not same opcode? prev_dom->in(0) == dom) { // One path of test does dominate? if (dom == this) return NULL; // dead loop // See if this is a range check