src/share/vm/opto/block.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 7079317 Sdiff src/share/vm/opto

src/share/vm/opto/block.cpp

Print this page




 822       if (bnext == bs0) {
 823         // Fall-thru case in succs[0], so flip targets in succs map
 824         Block *tbs0 = b->_succs[0];
 825         Block *tbs1 = b->_succs[1];
 826         b->_succs.map( 0, tbs1 );
 827         b->_succs.map( 1, tbs0 );
 828         // Flip projection for each target
 829         { ProjNode *tmp = proj0; proj0 = proj1; proj1 = tmp; }
 830 
 831       } else if( bnext != bs1 ) {
 832         // Need a double-branch
 833         // The existing conditional branch need not change.
 834         // Add a unconditional branch to the false target.
 835         // Alas, it must appear in its own block and adding a
 836         // block this late in the game is complicated.  Sigh.
 837         insert_goto_at(i, 1);
 838       }
 839 
 840       // Make sure we TRUE branch to the target
 841       if( proj0->Opcode() == Op_IfFalse ) {
 842         iff->negate();
 843       }
 844 
 845       b->_nodes.pop();          // Remove IfFalse & IfTrue projections
 846       b->_nodes.pop();
 847 
 848     } else {
 849       // Multi-exit block, e.g. a switch statement
 850       // But we don't need to do anything here
 851     }
 852   } // End of for all blocks
 853 }
 854 
 855 
 856 //------------------------------dump-------------------------------------------
 857 #ifndef PRODUCT
 858 void PhaseCFG::_dump_cfg( const Node *end, VectorSet &visited  ) const {
 859   const Node *x = end->is_block_proj();
 860   assert( x, "not a CFG" );
 861 
 862   // Do not visit this block again




 822       if (bnext == bs0) {
 823         // Fall-thru case in succs[0], so flip targets in succs map
 824         Block *tbs0 = b->_succs[0];
 825         Block *tbs1 = b->_succs[1];
 826         b->_succs.map( 0, tbs1 );
 827         b->_succs.map( 1, tbs0 );
 828         // Flip projection for each target
 829         { ProjNode *tmp = proj0; proj0 = proj1; proj1 = tmp; }
 830 
 831       } else if( bnext != bs1 ) {
 832         // Need a double-branch
 833         // The existing conditional branch need not change.
 834         // Add a unconditional branch to the false target.
 835         // Alas, it must appear in its own block and adding a
 836         // block this late in the game is complicated.  Sigh.
 837         insert_goto_at(i, 1);
 838       }
 839 
 840       // Make sure we TRUE branch to the target
 841       if( proj0->Opcode() == Op_IfFalse ) {
 842         iff->as_MachIf()->negate();
 843       }
 844 
 845       b->_nodes.pop();          // Remove IfFalse & IfTrue projections
 846       b->_nodes.pop();
 847 
 848     } else {
 849       // Multi-exit block, e.g. a switch statement
 850       // But we don't need to do anything here
 851     }
 852   } // End of for all blocks
 853 }
 854 
 855 
 856 //------------------------------dump-------------------------------------------
 857 #ifndef PRODUCT
 858 void PhaseCFG::_dump_cfg( const Node *end, VectorSet &visited  ) const {
 859   const Node *x = end->is_block_proj();
 860   assert( x, "not a CFG" );
 861 
 862   // Do not visit this block again


src/share/vm/opto/block.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File