hotspot/src/share/vm/c1/c1_IR.cpp
changeset 35097 cd29ef2a189d
parent 34160 3240e478a30e
child 38031 e0b822facc03
child 37248 11a660dbbb8e
equal deleted inserted replaced
35095:4ca2192f9709 35097:cd29ef2a189d
   577   if (is_active(cur)) {
   577   if (is_active(cur)) {
   578     TRACE_LINEAR_SCAN(3, tty->print_cr("backward branch"));
   578     TRACE_LINEAR_SCAN(3, tty->print_cr("backward branch"));
   579     assert(is_visited(cur), "block must be visisted when block is active");
   579     assert(is_visited(cur), "block must be visisted when block is active");
   580     assert(parent != NULL, "must have parent");
   580     assert(parent != NULL, "must have parent");
   581 
   581 
   582     cur->set(BlockBegin::linear_scan_loop_header_flag);
       
   583     cur->set(BlockBegin::backward_branch_target_flag);
   582     cur->set(BlockBegin::backward_branch_target_flag);
   584 
       
   585     parent->set(BlockBegin::linear_scan_loop_end_flag);
       
   586 
   583 
   587     // When a loop header is also the start of an exception handler, then the backward branch is
   584     // When a loop header is also the start of an exception handler, then the backward branch is
   588     // an exception edge. Because such edges are usually critical edges which cannot be split, the
   585     // an exception edge. Because such edges are usually critical edges which cannot be split, the
   589     // loop must be excluded here from processing.
   586     // loop must be excluded here from processing.
   590     if (cur->is_set(BlockBegin::exception_entry_flag)) {
   587     if (cur->is_set(BlockBegin::exception_entry_flag)) {
   591       // Make sure that dominators are correct in this weird situation
   588       // Make sure that dominators are correct in this weird situation
   592       _iterative_dominators = true;
   589       _iterative_dominators = true;
   593       return;
   590       return;
   594     }
   591     }
       
   592 
       
   593     cur->set(BlockBegin::linear_scan_loop_header_flag);
       
   594     parent->set(BlockBegin::linear_scan_loop_end_flag);
       
   595 
   595     assert(parent->number_of_sux() == 1 && parent->sux_at(0) == cur,
   596     assert(parent->number_of_sux() == 1 && parent->sux_at(0) == cur,
   596            "loop end blocks must have one successor (critical edges are split)");
   597            "loop end blocks must have one successor (critical edges are split)");
   597 
   598 
   598     _loop_end_blocks.append(parent);
   599     _loop_end_blocks.append(parent);
   599     return;
   600     return;