--- old/src/share/vm/opto/reg_split.cpp 2016-07-11 22:46:52.715355672 +0900 +++ new/src/share/vm/opto/reg_split.cpp 2016-07-11 22:46:52.579356148 +0900 @@ -60,10 +60,10 @@ // If ideal reg doesn't exist we've got a bad schedule happening // that is forcing us to spill something that isn't spillable. // Bail rather than abort - int ireg = def->ideal_reg(); - if (ireg == 0 || ireg == Op_RegFlags) { - assert(false, "attempted to spill a non-spillable item: %d: %s <- %d: %s, ireg = %d, spill_type: %s", - def->_idx, def->Name(), use->_idx, use->Name(), ireg, + Opcodes ireg = def->ideal_reg(); + if (ireg == Opcodes::Op_Node || ireg == Opcodes::Op_RegFlags) { + assert(false, "attempted to spill a non-spillable item: %d: %s <- %d: %s, ireg = %u, spill_type: %s", + def->_idx, def->Name(), use->_idx, use->Name(), static_cast(ireg), MachSpillCopyNode::spill_type(spill_type)); C->record_method_not_compilable("attempted to spill a non-spillable item"); return NULL; @@ -72,7 +72,7 @@ return NULL; } const RegMask *i_mask = &def->out_RegMask(); - const RegMask *w_mask = C->matcher()->idealreg2spillmask[ireg]; + const RegMask *w_mask = C->matcher()->idealreg2spillmask[static_cast(ireg)]; const RegMask *o_mask = use ? &use->in_RegMask(uidx) : w_mask; const RegMask *w_i_mask = w_mask->overlap( *i_mask ) ? w_mask : i_mask; const RegMask *w_o_mask; @@ -92,7 +92,7 @@ // Does the ideal-reg-mask overlap with o_mask? I.e., can I use // a reg-reg move or do I need a trip across register classes // (and thus through memory)? - if( !C->matcher()->idealreg2regmask[ireg]->overlap( *o_mask) && o_mask->is_UP() ) + if( !C->matcher()->idealreg2regmask[static_cast(ireg)]->overlap( *o_mask) && o_mask->is_UP() ) // Here we assume a trip through memory is required. w_i_mask = &C->FIRST_STACK_mask(); } @@ -156,7 +156,7 @@ Node *be = b->end(); if( be->is_MachNullCheck() && be->in(1) == def && def == b->get_node(loc)) { // Spill goes in the branch-not-taken block - b = b->_succs[b->get_node(b->end_idx()+1)->Opcode() == Op_IfTrue]; + b = b->_succs[b->get_node(b->end_idx()+1)->Opcode() == Opcodes::Op_IfTrue]; loc = 0; // Just past the Region } assert( loc >= 0, "must insert past block head" ); @@ -334,7 +334,7 @@ int idx_def = b_def->find_node(def); // Cannot spill Op_RegFlags. Node *in_spill; - if (in->ideal_reg() != Op_RegFlags) { + if (in->ideal_reg() != Opcodes::Op_RegFlags) { in_spill = get_spillcopy_wide(MachSpillCopyNode::InputToRematerialization, in, def, i); if (!in_spill) { return 0; } // Bailed out insert_proj(b_def, idx_def, in_spill, maxlrg++); @@ -951,7 +951,7 @@ MachNode *mach = n->is_Mach() ? n->as_Mach() : NULL; // Base pointers and oopmap references do not care where they live. if ((inpidx >= oopoff) || - (mach && mach->ideal_Opcode() == Op_AddP && inpidx == AddPNode::Base)) { + (mach && mach->ideal_Opcode() == Opcodes::Op_AddP && inpidx == AddPNode::Base)) { if (def->rematerialize() && lrgs(useidx)._was_spilled2) { // This def has been rematerialized a couple of times without // progress. It doesn't care if it lives UP or DOWN, so @@ -975,7 +975,7 @@ // both in derived/base pairs or kill one. Node *derived_debug = debug_defs[slidx]; if( ((inpidx - oopoff) & 1) == DERIVED && // derived vs base? - mach && mach->ideal_Opcode() != Op_Halt && + mach && mach->ideal_Opcode() != Opcodes::Op_Halt && derived_debug != NULL && derived_debug != def ) { // Actual 2nd value appears // We have already set 'def' as a derived value. @@ -1094,8 +1094,8 @@ else { // DOWN, mem->mem copy // COPY UP & DOWN HERE - NO DEF - NO CISC SPILL // First Split-UP to move value into Register - uint def_ideal = def->ideal_reg(); - const RegMask* tmp_rm = Matcher::idealreg2regmask[def_ideal]; + Opcodes def_ideal = def->ideal_reg(); + const RegMask* tmp_rm = Matcher::idealreg2regmask[static_cast(def_ideal)]; Node *spill = new MachSpillCopyNode(MachSpillCopyNode::MemToReg, def, dmask, *tmp_rm); insert_proj( b, insidx, spill, maxlrg ); // Then Split-DOWN as if previous Split was DEF @@ -1184,7 +1184,7 @@ // Grab UP info for DEF const RegMask &dmask = n->out_RegMask(); bool defup = dmask.is_UP(); - int ireg = n->ideal_reg(); + Opcodes ireg = n->ideal_reg(); bool is_vect = RegMask::is_vector(ireg); // Only split at Def if this is a HRP block or bound (and spilled once) if( !n->rematerialize() && @@ -1243,8 +1243,8 @@ if( OptoReg::is_stack(uselrg.reg()) && uselrg.reg() < LRG::SPILL_REG && // USE is from stack deflrg.reg() != uselrg.reg() ) { // Not trivially removed - uint def_ideal_reg = n->bottom_type()->ideal_reg(); - const RegMask &def_rm = *Matcher::idealreg2regmask[def_ideal_reg]; + Opcodes def_ideal_reg = n->bottom_type()->ideal_reg(); + const RegMask &def_rm = *Matcher::idealreg2regmask[static_cast(def_ideal_reg)]; const RegMask &use_rm = n->in_RegMask(copyidx); if( def_rm.overlap(use_rm) && n->is_SpillCopy() ) { // Bug 4707800, 'n' may be a storeSSL if (C->check_node_count(NodeLimitFudgeFactor, out_of_nodes)) { // Check when generating nodes