< prev index next >

src/share/vm/opto/buildOopMap.cpp

Print this page
rev 10512 : value type calling convention


 243 #ifdef _LP64
 244       // 64-bit pointers record oop-ishness on 2 aligned adjacent registers.
 245       // Make sure both are record from the same reaching def, but do not
 246       // put both into the oopmap.
 247       if( (reg&1) == 1 ) {      // High half of oop-pair?
 248         assert( _defs[reg-1] == _defs[reg], "both halves from same reaching def" );
 249         continue;               // Do not record high parts in oopmap
 250       }
 251 #endif
 252 
 253       // Check for a legal reg name in the oopMap and bailout if it is not.
 254       if (!omap->legal_vm_reg_name(r)) {
 255         regalloc->C->record_method_not_compilable("illegal oopMap register name");
 256         continue;
 257       }
 258       if( t->is_ptr()->_offset == 0 ) { // Not derived?
 259         if( mcall ) {
 260           // Outgoing argument GC mask responsibility belongs to the callee,
 261           // not the caller.  Inspect the inputs to the call, to see if
 262           // this live-range is one of them.
 263           uint cnt = mcall->tf()->domain()->cnt();
 264           uint j;
 265           for( j = TypeFunc::Parms; j < cnt; j++)
 266             if( mcall->in(j) == def )
 267               break;            // reaching def is an argument oop
 268           if( j < cnt )         // arg oops dont go in GC map
 269             continue;           // Continue on to the next register
 270         }
 271         omap->set_oop(r);
 272       } else {                  // Else it's derived.
 273         // Find the base of the derived value.
 274         uint i;
 275         // Fast, common case, scan
 276         for( i = jvms->oopoff(); i < n->req(); i+=2 )
 277           if( n->in(i) == def ) break; // Common case
 278         if( i == n->req() ) {   // Missed, try a more generous scan
 279           // Scan again, but this time peek through copies
 280           for( i = jvms->oopoff(); i < n->req(); i+=2 ) {
 281             Node *m = n->in(i); // Get initial derived value
 282             while( 1 ) {
 283               Node *d = def;    // Get initial reaching def


 313               omap->set_oop( b);
 314             }
 315           }
 316         }
 317         if (b->is_stack() || b->is_concrete() || true ) {
 318           omap->set_derived_oop( r, b);
 319         }
 320       }
 321 
 322     } else if( t->isa_narrowoop() ) {
 323       assert( !OptoReg::is_valid(_callees[reg]), "oop can't be callee save" );
 324       // Check for a legal reg name in the oopMap and bailout if it is not.
 325       if (!omap->legal_vm_reg_name(r)) {
 326         regalloc->C->record_method_not_compilable("illegal oopMap register name");
 327         continue;
 328       }
 329       if( mcall ) {
 330           // Outgoing argument GC mask responsibility belongs to the callee,
 331           // not the caller.  Inspect the inputs to the call, to see if
 332           // this live-range is one of them.
 333         uint cnt = mcall->tf()->domain()->cnt();
 334         uint j;
 335         for( j = TypeFunc::Parms; j < cnt; j++)
 336           if( mcall->in(j) == def )
 337             break;            // reaching def is an argument oop
 338         if( j < cnt )         // arg oops dont go in GC map
 339           continue;           // Continue on to the next register
 340       }
 341       omap->set_narrowoop(r);
 342     } else if( OptoReg::is_valid(_callees[reg])) { // callee-save?
 343       // It's a callee-save value
 344       assert( dup_check[_callees[reg]]==0, "trying to callee save same reg twice" );
 345       debug_only( dup_check[_callees[reg]]=1; )
 346       VMReg callee = OptoReg::as_VMReg(OptoReg::Name(_callees[reg]));
 347       if ( callee->is_concrete() || true ) {
 348         omap->set_callee_saved( r, callee);
 349       }
 350 
 351     } else {
 352       // Other - some reaching non-oop value
 353       omap->set_value( r);




 243 #ifdef _LP64
 244       // 64-bit pointers record oop-ishness on 2 aligned adjacent registers.
 245       // Make sure both are record from the same reaching def, but do not
 246       // put both into the oopmap.
 247       if( (reg&1) == 1 ) {      // High half of oop-pair?
 248         assert( _defs[reg-1] == _defs[reg], "both halves from same reaching def" );
 249         continue;               // Do not record high parts in oopmap
 250       }
 251 #endif
 252 
 253       // Check for a legal reg name in the oopMap and bailout if it is not.
 254       if (!omap->legal_vm_reg_name(r)) {
 255         regalloc->C->record_method_not_compilable("illegal oopMap register name");
 256         continue;
 257       }
 258       if( t->is_ptr()->_offset == 0 ) { // Not derived?
 259         if( mcall ) {
 260           // Outgoing argument GC mask responsibility belongs to the callee,
 261           // not the caller.  Inspect the inputs to the call, to see if
 262           // this live-range is one of them.
 263           uint cnt = mcall->tf()->domain_cc()->cnt();
 264           uint j;
 265           for( j = TypeFunc::Parms; j < cnt; j++)
 266             if( mcall->in(j) == def )
 267               break;            // reaching def is an argument oop
 268           if( j < cnt )         // arg oops dont go in GC map
 269             continue;           // Continue on to the next register
 270         }
 271         omap->set_oop(r);
 272       } else {                  // Else it's derived.
 273         // Find the base of the derived value.
 274         uint i;
 275         // Fast, common case, scan
 276         for( i = jvms->oopoff(); i < n->req(); i+=2 )
 277           if( n->in(i) == def ) break; // Common case
 278         if( i == n->req() ) {   // Missed, try a more generous scan
 279           // Scan again, but this time peek through copies
 280           for( i = jvms->oopoff(); i < n->req(); i+=2 ) {
 281             Node *m = n->in(i); // Get initial derived value
 282             while( 1 ) {
 283               Node *d = def;    // Get initial reaching def


 313               omap->set_oop( b);
 314             }
 315           }
 316         }
 317         if (b->is_stack() || b->is_concrete() || true ) {
 318           omap->set_derived_oop( r, b);
 319         }
 320       }
 321 
 322     } else if( t->isa_narrowoop() ) {
 323       assert( !OptoReg::is_valid(_callees[reg]), "oop can't be callee save" );
 324       // Check for a legal reg name in the oopMap and bailout if it is not.
 325       if (!omap->legal_vm_reg_name(r)) {
 326         regalloc->C->record_method_not_compilable("illegal oopMap register name");
 327         continue;
 328       }
 329       if( mcall ) {
 330           // Outgoing argument GC mask responsibility belongs to the callee,
 331           // not the caller.  Inspect the inputs to the call, to see if
 332           // this live-range is one of them.
 333         uint cnt = mcall->tf()->domain_cc()->cnt();
 334         uint j;
 335         for( j = TypeFunc::Parms; j < cnt; j++)
 336           if( mcall->in(j) == def )
 337             break;            // reaching def is an argument oop
 338         if( j < cnt )         // arg oops dont go in GC map
 339           continue;           // Continue on to the next register
 340       }
 341       omap->set_narrowoop(r);
 342     } else if( OptoReg::is_valid(_callees[reg])) { // callee-save?
 343       // It's a callee-save value
 344       assert( dup_check[_callees[reg]]==0, "trying to callee save same reg twice" );
 345       debug_only( dup_check[_callees[reg]]=1; )
 346       VMReg callee = OptoReg::as_VMReg(OptoReg::Name(_callees[reg]));
 347       if ( callee->is_concrete() || true ) {
 348         omap->set_callee_saved( r, callee);
 349       }
 350 
 351     } else {
 352       // Other - some reaching non-oop value
 353       omap->set_value( r);


< prev index next >