< prev index next >

src/share/vm/opto/machnode.cpp

Print this page

        

*** 191,204 **** //-----------------------------in_RegMask-------------------------------------- const RegMask &MachNode::in_RegMask( uint idx ) const { uint numopnds = num_opnds(); // Virtual call for number of operands uint skipped = oper_input_base(); // Sum of leaves skipped so far if( idx < skipped ) { ! assert( ideal_Opcode() == Op_AddP, "expected base ptr here" ); assert( idx == 1, "expected base ptr here" ); // debug info can be anywhere ! return *Compile::current()->matcher()->idealreg2spillmask[Op_RegP]; } uint opcnt = 1; // First operand uint num_edges = _opnds[1]->num_edges(); // leaves for first operand while( idx >= skipped+num_edges ) { skipped += num_edges; --- 191,204 ---- //-----------------------------in_RegMask-------------------------------------- const RegMask &MachNode::in_RegMask( uint idx ) const { uint numopnds = num_opnds(); // Virtual call for number of operands uint skipped = oper_input_base(); // Sum of leaves skipped so far if( idx < skipped ) { ! assert( ideal_Opcode() == Opcodes::Op_AddP, "expected base ptr here" ); assert( idx == 1, "expected base ptr here" ); // debug info can be anywhere ! return *Compile::current()->matcher()->idealreg2spillmask[static_cast<uint>(Opcodes::Op_RegP)]; } uint opcnt = 1; // First operand uint num_edges = _opnds[1]->num_edges(); // leaves for first operand while( idx >= skipped+num_edges ) { skipped += num_edges;
*** 442,468 **** // live range. Remateralizing does not make progress on the that live range. if (two_adr()) return false; // Check for rematerializing float constants, or not if (!Matcher::rematerialize_float_constants) { ! int op = ideal_Opcode(); ! if (op == Op_ConF || op == Op_ConD) { return false; } } // Defining flags - can't spill these! Must remateralize. ! if (ideal_reg() == Op_RegFlags) { return true; } // Stretching lots of inputs - don't do it. if (req() > 2) { return false; } ! if (req() == 2 && in(1) && in(1)->ideal_reg() == Op_RegFlags) { // In(1) will be rematerialized, too. // Stretching lots of inputs - don't do it. if (in(1)->req() > 2) { return false; } --- 442,468 ---- // live range. Remateralizing does not make progress on the that live range. if (two_adr()) return false; // Check for rematerializing float constants, or not if (!Matcher::rematerialize_float_constants) { ! Opcodes op = ideal_Opcode(); ! if (op == Opcodes::Op_ConF || op == Opcodes::Op_ConD) { return false; } } // Defining flags - can't spill these! Must remateralize. ! if (ideal_reg() == Opcodes::Op_RegFlags) { return true; } // Stretching lots of inputs - don't do it. if (req() > 2) { return false; } ! if (req() == 2 && in(1) && in(1)->ideal_reg() == Opcodes::Op_RegFlags) { // In(1) will be rematerialized, too. // Stretching lots of inputs - don't do it. if (in(1)->req() > 2) { return false; }
*** 565,585 **** else return in(1)->as_Mach()->out_RegMask(); } //============================================================================= const Type *MachProjNode::bottom_type() const { ! if( _ideal_reg == fat_proj ) return Type::BOTTOM; // Try the normal mechanism first const Type *t = in(0)->bottom_type(); if( t->base() == Type::Tuple ) { const TypeTuple *tt = t->is_tuple(); if (_con < tt->cnt()) return tt->field_at(_con); } // Else use generic type from ideal register set ! assert((uint)_ideal_reg < (uint)_last_machine_leaf && Type::mreg2type[_ideal_reg], "in bounds"); ! return Type::mreg2type[_ideal_reg]; } const TypePtr *MachProjNode::adr_type() const { if (bottom_type() == Type::MEMORY) { // in(0) might be a narrow MemBar; otherwise we will report TypePtr::BOTTOM --- 565,585 ---- else return in(1)->as_Mach()->out_RegMask(); } //============================================================================= const Type *MachProjNode::bottom_type() const { ! if( _ideal_reg == static_cast<Opcodes>(MachProjNode::projType::fat_proj) ) return Type::BOTTOM; // Try the normal mechanism first const Type *t = in(0)->bottom_type(); if( t->base() == Type::Tuple ) { const TypeTuple *tt = t->is_tuple(); if (_con < tt->cnt()) return tt->field_at(_con); } // Else use generic type from ideal register set ! assert(_ideal_reg < Opcodes::_last_machine_leaf && Type::mreg2type[static_cast<uint>(_ideal_reg)], "in bounds"); ! return Type::mreg2type[static_cast<uint>(_ideal_reg)]; } const TypePtr *MachProjNode::adr_type() const { if (bottom_type() == Type::MEMORY) { // in(0) might be a narrow MemBar; otherwise we will report TypePtr::BOTTOM
*** 597,609 **** } #ifndef PRODUCT void MachProjNode::dump_spec(outputStream *st) const { ProjNode::dump_spec(st); ! switch (_ideal_reg) { ! case unmatched_proj: st->print("/unmatched"); break; ! case fat_proj: st->print("/fat"); if (WizardMode) _rout.dump(st); break; } } #endif //============================================================================= --- 597,613 ---- } #ifndef PRODUCT void MachProjNode::dump_spec(outputStream *st) const { ProjNode::dump_spec(st); ! switch (static_cast<MachProjNode::projType>(_ideal_reg)) { ! case MachProjNode::projType::unmatched_proj: ! st->print("/unmatched"); ! break; ! case MachProjNode::projType::fat_proj: ! st->print("/fat"); if (WizardMode) _rout.dump(st); ! break; } } #endif //=============================================================================
*** 636,651 **** // _in_rms array of RegMasks. if( idx < TypeFunc::Parms ) return _in_rms[idx]; if (SafePointNode::needs_polling_address_input() && idx == TypeFunc::Parms && ! ideal_Opcode() == Op_SafePoint) { return MachNode::in_RegMask(idx); } // Values outside the domain represent debug info ! return *Compile::current()->matcher()->idealreg2spillmask[in(idx)->ideal_reg()]; } //============================================================================= --- 640,655 ---- // _in_rms array of RegMasks. if( idx < TypeFunc::Parms ) return _in_rms[idx]; if (SafePointNode::needs_polling_address_input() && idx == TypeFunc::Parms && ! ideal_Opcode() == Opcodes::Op_SafePoint) { return MachNode::in_RegMask(idx); } // Values outside the domain represent debug info ! return *Compile::current()->matcher()->idealreg2spillmask[static_cast<uint>(in(idx)->ideal_reg())]; } //=============================================================================
*** 698,708 **** } if (idx == mach_constant_base_node_input()) { return MachConstantBaseNode::static_out_RegMask(); } // Values outside the domain represent debug info ! return *Compile::current()->matcher()->idealreg2debugmask[in(idx)->ideal_reg()]; } //============================================================================= uint MachCallJavaNode::size_of() const { return sizeof(*this); } uint MachCallJavaNode::cmp( const Node &n ) const { --- 702,712 ---- } if (idx == mach_constant_base_node_input()) { return MachConstantBaseNode::static_out_RegMask(); } // Values outside the domain represent debug info ! return *Compile::current()->matcher()->idealreg2debugmask[static_cast<uint>(in(idx)->ideal_reg())]; } //============================================================================= uint MachCallJavaNode::size_of() const { return sizeof(*this); } uint MachCallJavaNode::cmp( const Node &n ) const {
*** 736,746 **** Matcher* m = Compile::current()->matcher(); // If this call is a MethodHandle invoke we have to use a different // debugmask which does not include the register we use to save the // SP over MH invokes. RegMask** debugmask = _method_handle_invoke ? m->idealreg2mhdebugmask : m->idealreg2debugmask; ! return *debugmask[in(idx)->ideal_reg()]; } //============================================================================= uint MachCallStaticJavaNode::size_of() const { return sizeof(*this); } uint MachCallStaticJavaNode::cmp( const Node &n ) const { --- 740,750 ---- Matcher* m = Compile::current()->matcher(); // If this call is a MethodHandle invoke we have to use a different // debugmask which does not include the register we use to save the // SP over MH invokes. RegMask** debugmask = _method_handle_invoke ? m->idealreg2mhdebugmask : m->idealreg2debugmask; ! return *debugmask[static_cast<uint>(in(idx)->ideal_reg())]; } //============================================================================= uint MachCallStaticJavaNode::size_of() const { return sizeof(*this); } uint MachCallStaticJavaNode::cmp( const Node &n ) const {
< prev index next >