< prev index next >

src/hotspot/share/opto/output.cpp

Print this page




2395       if( iop == Op_Node &&     // Do not schedule PhiNodes, ProjNodes
2396           mach->pipeline() == MachNode::pipeline_class() &&
2397           !n->is_SpillCopy() && !n->is_MachMerge() )  // Breakpoints, Prolog, etc
2398         continue;
2399       break;                    // Funny loop structure to be sure...
2400     }
2401     // Compute last "interesting" instruction in block - last instruction we
2402     // might schedule.  _bb_end points just after last schedulable inst.  We
2403     // normally schedule conditional branches (despite them being forced last
2404     // in the block), because they have delay slots we can fill.  Calls all
2405     // have their delay slots filled in the template expansions, so we don't
2406     // bother scheduling them.
2407     Node *last = bb->get_node(_bb_end);
2408     // Ignore trailing NOPs.
2409     while (_bb_end > 0 && last->is_Mach() &&
2410            last->as_Mach()->ideal_Opcode() == Op_Con) {
2411       last = bb->get_node(--_bb_end);
2412     }
2413     assert(!last->is_Mach() || last->as_Mach()->ideal_Opcode() != Op_Con, "");
2414     if( last->is_Catch() ||
2415        (last->is_Mach() && last->as_Mach()->ideal_Opcode() == Op_Halt) ) {
2416       // There might be a prior call.  Skip it.
2417       while (_bb_start < _bb_end && bb->get_node(--_bb_end)->is_MachProj());



2418     } else if( last->is_MachNullCheck() ) {
2419       // Backup so the last null-checked memory instruction is
2420       // outside the schedulable range. Skip over the nullcheck,
2421       // projection, and the memory nodes.
2422       Node *mem = last->in(1);
2423       do {
2424         _bb_end--;
2425       } while (mem != bb->get_node(_bb_end));
2426     } else {
2427       // Set _bb_end to point after last schedulable inst.
2428       _bb_end++;
2429     }
2430 
2431     assert( _bb_start <= _bb_end, "inverted block ends" );
2432 
2433     // Compute the register antidependencies for the basic block
2434     ComputeRegisterAntidependencies(bb);
2435     if (_cfg->C->failing())  return;  // too many D-U pinch points
2436 
2437     // Compute intra-bb latencies for the nodes




2395       if( iop == Op_Node &&     // Do not schedule PhiNodes, ProjNodes
2396           mach->pipeline() == MachNode::pipeline_class() &&
2397           !n->is_SpillCopy() && !n->is_MachMerge() )  // Breakpoints, Prolog, etc
2398         continue;
2399       break;                    // Funny loop structure to be sure...
2400     }
2401     // Compute last "interesting" instruction in block - last instruction we
2402     // might schedule.  _bb_end points just after last schedulable inst.  We
2403     // normally schedule conditional branches (despite them being forced last
2404     // in the block), because they have delay slots we can fill.  Calls all
2405     // have their delay slots filled in the template expansions, so we don't
2406     // bother scheduling them.
2407     Node *last = bb->get_node(_bb_end);
2408     // Ignore trailing NOPs.
2409     while (_bb_end > 0 && last->is_Mach() &&
2410            last->as_Mach()->ideal_Opcode() == Op_Con) {
2411       last = bb->get_node(--_bb_end);
2412     }
2413     assert(!last->is_Mach() || last->as_Mach()->ideal_Opcode() != Op_Con, "");
2414     if( last->is_Catch() ||
2415        // Exclude unreachable path case when Halt node is in a separate block.
2416        (_bb_end > 1 && last->is_Mach() && last->as_Mach()->ideal_Opcode() == Op_Halt) ) {
2417       // There must be a prior call.  Skip it.
2418       while( !bb->get_node(--_bb_end)->is_MachCall() ) {
2419         assert( bb->get_node(_bb_end)->is_MachProj(), "skipping projections after expected call" );
2420       }
2421     } else if( last->is_MachNullCheck() ) {
2422       // Backup so the last null-checked memory instruction is
2423       // outside the schedulable range. Skip over the nullcheck,
2424       // projection, and the memory nodes.
2425       Node *mem = last->in(1);
2426       do {
2427         _bb_end--;
2428       } while (mem != bb->get_node(_bb_end));
2429     } else {
2430       // Set _bb_end to point after last schedulable inst.
2431       _bb_end++;
2432     }
2433 
2434     assert( _bb_start <= _bb_end, "inverted block ends" );
2435 
2436     // Compute the register antidependencies for the basic block
2437     ComputeRegisterAntidependencies(bb);
2438     if (_cfg->C->failing())  return;  // too many D-U pinch points
2439 
2440     // Compute intra-bb latencies for the nodes


< prev index next >