hotspot/src/share/vm/opto/block.cpp
changeset 38046 f8383064eaa2
parent 37248 11a660dbbb8e
child 38658 34f9c45625d8
equal deleted inserted replaced
38045:808cbf1958ce 38046:f8383064eaa2
    71   }
    71   }
    72   tty->print("size = %d\n", size());
    72   tty->print("size = %d\n", size());
    73 }
    73 }
    74 #endif
    74 #endif
    75 
    75 
    76 uint Block::code_alignment() {
    76 uint Block::code_alignment() const {
    77   // Check for Root block
    77   // Check for Root block
    78   if (_pre_order == 0) return CodeEntryAlignment;
    78   if (_pre_order == 0) return CodeEntryAlignment;
    79   // Check for Start block
    79   // Check for Start block
    80   if (_pre_order == 1) return InteriorEntryAlignment;
    80   if (_pre_order == 1) return InteriorEntryAlignment;
    81   // Check for loop alignment
    81   // Check for loop alignment
  1725     }
  1725     }
  1726 
  1726 
  1727     first_block()->set_loop_alignment(targ_block);
  1727     first_block()->set_loop_alignment(targ_block);
  1728 
  1728 
  1729   } else {
  1729   } else {
  1730     // Backbranch into the middle of a trace
  1730     // That loop may already have a loop top (we're reaching it again
  1731     targ_block->set_loop_alignment(targ_block);
  1731     // through the backedge of an outer loop)
       
  1732     Block* b = prev(targ_block);
       
  1733     bool has_top = targ_block->head()->is_Loop() && b->has_loop_alignment() && !b->head()->is_Loop();
       
  1734     if (!has_top) {
       
  1735       // Backbranch into the middle of a trace
       
  1736       targ_block->set_loop_alignment(targ_block);
       
  1737     }
  1732   }
  1738   }
  1733 
  1739 
  1734   return loop_rotated;
  1740   return loop_rotated;
  1735 }
  1741 }
  1736 
  1742