< prev index next >

src/share/vm/opto/matcher.cpp

Print this page
rev 10979 : 8140594: Various minor code improvements (compiler)


 642   // Save argument registers in the trampolining stubs
 643   if( C->save_argument_registers() )
 644     for( i = 0; i < _last_Mach_Reg; i++ )
 645       if( is_spillable_arg(i) )
 646         soe_cnt++;
 647 
 648   // Input RegMask array shared by all Returns.
 649   // The type for doubles and longs has a count of 2, but
 650   // there is only 1 returned value
 651   uint ret_edge_cnt = TypeFunc::Parms + ((C->tf()->range()->cnt() == TypeFunc::Parms) ? 0 : 1);
 652   RegMask *ret_rms  = init_input_masks( ret_edge_cnt + soe_cnt, _return_addr_mask, c_frame_ptr_mask );
 653   // Returns have 0 or 1 returned values depending on call signature.
 654   // Return register is specified by return_value in the AD file.
 655   if (ret_edge_cnt > TypeFunc::Parms)
 656     ret_rms[TypeFunc::Parms+0] = _return_value_mask;
 657 
 658   // Input RegMask array shared by all Rethrows.
 659   uint reth_edge_cnt = TypeFunc::Parms+1;
 660   RegMask *reth_rms  = init_input_masks( reth_edge_cnt + soe_cnt, _return_addr_mask, c_frame_ptr_mask );
 661   // Rethrow takes exception oop only, but in the argument 0 slot.
 662   reth_rms[TypeFunc::Parms] = mreg2regmask[find_receiver(false)];


 663 #ifdef _LP64
 664   // Need two slots for ptrs in 64-bit land
 665   reth_rms[TypeFunc::Parms].Insert(OptoReg::add(OptoReg::Name(find_receiver(false)),1));
 666 #endif

 667 
 668   // Input RegMask array shared by all TailCalls
 669   uint tail_call_edge_cnt = TypeFunc::Parms+2;
 670   RegMask *tail_call_rms = init_input_masks( tail_call_edge_cnt + soe_cnt, _return_addr_mask, c_frame_ptr_mask );
 671 
 672   // Input RegMask array shared by all TailJumps
 673   uint tail_jump_edge_cnt = TypeFunc::Parms+2;
 674   RegMask *tail_jump_rms = init_input_masks( tail_jump_edge_cnt + soe_cnt, _return_addr_mask, c_frame_ptr_mask );
 675 
 676   // TailCalls have 2 returned values (target & moop), whose masks come
 677   // from the usual MachNode/MachOper mechanism.  Find a sample
 678   // TailCall to extract these masks and put the correct masks into
 679   // the tail_call_rms array.
 680   for( i=1; i < root->req(); i++ ) {
 681     MachReturnNode *m = root->in(i)->as_MachReturn();
 682     if( m->ideal_Opcode() == Op_TailCall ) {
 683       tail_call_rms[TypeFunc::Parms+0] = m->MachNode::in_RegMask(TypeFunc::Parms+0);
 684       tail_call_rms[TypeFunc::Parms+1] = m->MachNode::in_RegMask(TypeFunc::Parms+1);
 685       break;
 686     }




 642   // Save argument registers in the trampolining stubs
 643   if( C->save_argument_registers() )
 644     for( i = 0; i < _last_Mach_Reg; i++ )
 645       if( is_spillable_arg(i) )
 646         soe_cnt++;
 647 
 648   // Input RegMask array shared by all Returns.
 649   // The type for doubles and longs has a count of 2, but
 650   // there is only 1 returned value
 651   uint ret_edge_cnt = TypeFunc::Parms + ((C->tf()->range()->cnt() == TypeFunc::Parms) ? 0 : 1);
 652   RegMask *ret_rms  = init_input_masks( ret_edge_cnt + soe_cnt, _return_addr_mask, c_frame_ptr_mask );
 653   // Returns have 0 or 1 returned values depending on call signature.
 654   // Return register is specified by return_value in the AD file.
 655   if (ret_edge_cnt > TypeFunc::Parms)
 656     ret_rms[TypeFunc::Parms+0] = _return_value_mask;
 657 
 658   // Input RegMask array shared by all Rethrows.
 659   uint reth_edge_cnt = TypeFunc::Parms+1;
 660   RegMask *reth_rms  = init_input_masks( reth_edge_cnt + soe_cnt, _return_addr_mask, c_frame_ptr_mask );
 661   // Rethrow takes exception oop only, but in the argument 0 slot.
 662   OptoReg::Name reg = find_receiver(false);
 663   if (reg >= 0) {
 664     reth_rms[TypeFunc::Parms] = mreg2regmask[reg];
 665 #ifdef _LP64
 666     // Need two slots for ptrs in 64-bit land
 667     reth_rms[TypeFunc::Parms].Insert(OptoReg::add(OptoReg::Name(reg), 1));
 668 #endif
 669   }
 670 
 671   // Input RegMask array shared by all TailCalls
 672   uint tail_call_edge_cnt = TypeFunc::Parms+2;
 673   RegMask *tail_call_rms = init_input_masks( tail_call_edge_cnt + soe_cnt, _return_addr_mask, c_frame_ptr_mask );
 674 
 675   // Input RegMask array shared by all TailJumps
 676   uint tail_jump_edge_cnt = TypeFunc::Parms+2;
 677   RegMask *tail_jump_rms = init_input_masks( tail_jump_edge_cnt + soe_cnt, _return_addr_mask, c_frame_ptr_mask );
 678 
 679   // TailCalls have 2 returned values (target & moop), whose masks come
 680   // from the usual MachNode/MachOper mechanism.  Find a sample
 681   // TailCall to extract these masks and put the correct masks into
 682   // the tail_call_rms array.
 683   for( i=1; i < root->req(); i++ ) {
 684     MachReturnNode *m = root->in(i)->as_MachReturn();
 685     if( m->ideal_Opcode() == Op_TailCall ) {
 686       tail_call_rms[TypeFunc::Parms+0] = m->MachNode::in_RegMask(TypeFunc::Parms+0);
 687       tail_call_rms[TypeFunc::Parms+1] = m->MachNode::in_RegMask(TypeFunc::Parms+1);
 688       break;
 689     }


< prev index next >