1594 int _loop_depth; // the loop nesting level of this block |
1594 int _loop_depth; // the loop nesting level of this block |
1595 int _loop_index; // number of the innermost loop of this block |
1595 int _loop_index; // number of the innermost loop of this block |
1596 int _flags; // the flags associated with this block |
1596 int _flags; // the flags associated with this block |
1597 |
1597 |
1598 // fields used by BlockListBuilder |
1598 // fields used by BlockListBuilder |
1599 int _total_preds; // number of predecessors found by BlockListBuilder |
1599 int _total_preds; // number of predecessors found by BlockListBuilder |
1600 BitMap _stores_to_locals; // bit is set when a local variable is stored in the block |
1600 ResourceBitMap _stores_to_locals; // bit is set when a local variable is stored in the block |
1601 |
1601 |
1602 // SSA specific fields: (factor out later) |
1602 // SSA specific fields: (factor out later) |
1603 BlockList _successors; // the successors of this block |
1603 BlockList _successors; // the successors of this block |
1604 BlockList _predecessors; // the predecessors of this block |
1604 BlockList _predecessors; // the predecessors of this block |
1605 BlockList _dominates; // list of blocks that are dominated by this block |
1605 BlockList _dominates; // list of blocks that are dominated by this block |
1612 // this records the PC offset in the assembly code of the |
1612 // this records the PC offset in the assembly code of the |
1613 // first instruction in this block |
1613 // first instruction in this block |
1614 Label _label; // the label associated with this block |
1614 Label _label; // the label associated with this block |
1615 LIR_List* _lir; // the low level intermediate representation for this block |
1615 LIR_List* _lir; // the low level intermediate representation for this block |
1616 |
1616 |
1617 BitMap _live_in; // set of live LIR_Opr registers at entry to this block |
1617 ResourceBitMap _live_in; // set of live LIR_Opr registers at entry to this block |
1618 BitMap _live_out; // set of live LIR_Opr registers at exit from this block |
1618 ResourceBitMap _live_out; // set of live LIR_Opr registers at exit from this block |
1619 BitMap _live_gen; // set of registers used before any redefinition in this block |
1619 ResourceBitMap _live_gen; // set of registers used before any redefinition in this block |
1620 BitMap _live_kill; // set of registers defined in this block |
1620 ResourceBitMap _live_kill; // set of registers defined in this block |
1621 |
1621 |
1622 BitMap _fpu_register_usage; |
1622 ResourceBitMap _fpu_register_usage; |
1623 intArray* _fpu_stack_state; // For x86 FPU code generation with UseLinearScan |
1623 intArray* _fpu_stack_state; // For x86 FPU code generation with UseLinearScan |
1624 int _first_lir_instruction_id; // ID of first LIR instruction in this block |
1624 int _first_lir_instruction_id; // ID of first LIR instruction in this block |
1625 int _last_lir_instruction_id; // ID of last LIR instruction in this block |
1625 int _last_lir_instruction_id; // ID of last LIR instruction in this block |
1626 |
1626 |
1627 void iterate_preorder (boolArray& mark, BlockClosure* closure); |
1627 void iterate_preorder (boolArray& mark, BlockClosure* closure); |
1628 void iterate_postorder(boolArray& mark, BlockClosure* closure); |
1628 void iterate_postorder(boolArray& mark, BlockClosure* closure); |
1629 |
1629 |
1630 friend class SuxAndWeightAdjuster; |
1630 friend class SuxAndWeightAdjuster; |
1691 int linear_scan_number() const { return _linear_scan_number; } |
1691 int linear_scan_number() const { return _linear_scan_number; } |
1692 BlockEnd* end() const { return _end; } |
1692 BlockEnd* end() const { return _end; } |
1693 Label* label() { return &_label; } |
1693 Label* label() { return &_label; } |
1694 LIR_List* lir() const { return _lir; } |
1694 LIR_List* lir() const { return _lir; } |
1695 int exception_handler_pco() const { return _exception_handler_pco; } |
1695 int exception_handler_pco() const { return _exception_handler_pco; } |
1696 BitMap& live_in() { return _live_in; } |
1696 ResourceBitMap& live_in() { return _live_in; } |
1697 BitMap& live_out() { return _live_out; } |
1697 ResourceBitMap& live_out() { return _live_out; } |
1698 BitMap& live_gen() { return _live_gen; } |
1698 ResourceBitMap& live_gen() { return _live_gen; } |
1699 BitMap& live_kill() { return _live_kill; } |
1699 ResourceBitMap& live_kill() { return _live_kill; } |
1700 BitMap& fpu_register_usage() { return _fpu_register_usage; } |
1700 ResourceBitMap& fpu_register_usage() { return _fpu_register_usage; } |
1701 intArray* fpu_stack_state() const { return _fpu_stack_state; } |
1701 intArray* fpu_stack_state() const { return _fpu_stack_state; } |
1702 int first_lir_instruction_id() const { return _first_lir_instruction_id; } |
1702 int first_lir_instruction_id() const { return _first_lir_instruction_id; } |
1703 int last_lir_instruction_id() const { return _last_lir_instruction_id; } |
1703 int last_lir_instruction_id() const { return _last_lir_instruction_id; } |
1704 int total_preds() const { return _total_preds; } |
1704 int total_preds() const { return _total_preds; } |
1705 BitMap& stores_to_locals() { return _stores_to_locals; } |
1705 BitMap& stores_to_locals() { return _stores_to_locals; } |
1716 static void disconnect_edge(BlockBegin* from, BlockBegin* to); |
1716 static void disconnect_edge(BlockBegin* from, BlockBegin* to); |
1717 BlockBegin* insert_block_between(BlockBegin* sux); |
1717 BlockBegin* insert_block_between(BlockBegin* sux); |
1718 void substitute_sux(BlockBegin* old_sux, BlockBegin* new_sux); |
1718 void substitute_sux(BlockBegin* old_sux, BlockBegin* new_sux); |
1719 void set_lir(LIR_List* lir) { _lir = lir; } |
1719 void set_lir(LIR_List* lir) { _lir = lir; } |
1720 void set_exception_handler_pco(int pco) { _exception_handler_pco = pco; } |
1720 void set_exception_handler_pco(int pco) { _exception_handler_pco = pco; } |
1721 void set_live_in (BitMap map) { _live_in = map; } |
1721 void set_live_in (const ResourceBitMap& map) { _live_in = map; } |
1722 void set_live_out (BitMap map) { _live_out = map; } |
1722 void set_live_out (const ResourceBitMap& map) { _live_out = map; } |
1723 void set_live_gen (BitMap map) { _live_gen = map; } |
1723 void set_live_gen (const ResourceBitMap& map) { _live_gen = map; } |
1724 void set_live_kill (BitMap map) { _live_kill = map; } |
1724 void set_live_kill(const ResourceBitMap& map) { _live_kill = map; } |
1725 void set_fpu_register_usage(BitMap map) { _fpu_register_usage = map; } |
1725 void set_fpu_register_usage(const ResourceBitMap& map) { _fpu_register_usage = map; } |
1726 void set_fpu_stack_state(intArray* state) { _fpu_stack_state = state; } |
1726 void set_fpu_stack_state(intArray* state) { _fpu_stack_state = state; } |
1727 void set_first_lir_instruction_id(int id) { _first_lir_instruction_id = id; } |
1727 void set_first_lir_instruction_id(int id) { _first_lir_instruction_id = id; } |
1728 void set_last_lir_instruction_id(int id) { _last_lir_instruction_id = id; } |
1728 void set_last_lir_instruction_id(int id) { _last_lir_instruction_id = id; } |
1729 void increment_total_preds(int n = 1) { _total_preds += n; } |
1729 void increment_total_preds(int n = 1) { _total_preds += n; } |
1730 void init_stores_to_locals(int locals_count) { _stores_to_locals = BitMap(locals_count); _stores_to_locals.clear(); } |
1730 void init_stores_to_locals(int locals_count) { _stores_to_locals.initialize(locals_count); } |
1731 |
1731 |
1732 // generic |
1732 // generic |
1733 virtual void state_values_do(ValueVisitor* f); |
1733 virtual void state_values_do(ValueVisitor* f); |
1734 |
1734 |
1735 // successors and predecessors |
1735 // successors and predecessors |