Chromium Code Reviews| Index: runtime/vm/intermediate_language.h |
| =================================================================== |
| --- runtime/vm/intermediate_language.h (revision 11934) |
| +++ runtime/vm/intermediate_language.h (working copy) |
| @@ -428,6 +428,7 @@ |
| private: |
| friend class Definition; // Needed for InsertBefore, InsertAfter. |
| + friend class LICM; |
|
srdjan
2012/09/06 13:44:26
Please add why, or move the comment if it is valid
Florian Schneider
2012/09/06 13:49:30
Moved it to below where the comment applies.
|
| // Classes that set deopt_id_. |
| friend class UnboxDoubleInstr; |
| @@ -604,6 +605,8 @@ |
| dominated_blocks_.Add(block); |
| } |
| + bool Dominates(BlockEntryInstr* other) const; |
| + |
| Instruction* last_instruction() const { return last_instruction_; } |
| void set_last_instruction(Instruction* instr) { last_instruction_ = instr; } |
| @@ -644,6 +647,13 @@ |
| intptr_t try_index() const { return try_index_; } |
| + const ZoneGrowableArray<BlockEntryInstr*>* loop_info() const { |
| + return loop_info_; |
| + } |
| + void set_loop_info(const ZoneGrowableArray<BlockEntryInstr*>* loop_info) { |
| + loop_info_ = loop_info; |
| + } |
| + |
| protected: |
| explicit BlockEntryInstr(intptr_t try_index) |
| : try_index_(try_index), |
| @@ -653,7 +663,8 @@ |
| dominator_(NULL), |
| dominated_blocks_(1), |
| last_instruction_(NULL), |
| - parallel_move_(NULL) { } |
| + parallel_move_(NULL), |
| + loop_info_(NULL) { } |
| private: |
| const intptr_t try_index_; |
| @@ -673,6 +684,8 @@ |
| // connect live ranges at the start of the block. |
| ParallelMoveInstr* parallel_move_; |
| + const ZoneGrowableArray<BlockEntryInstr*>* loop_info_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(BlockEntryInstr); |
| }; |
| @@ -1003,6 +1016,9 @@ |
| virtual void RecordAssignedVars(BitVector* assigned_vars, |
| intptr_t fixed_parameter_count); |
| + // Get the block entry for that instruction. |
| + virtual BlockEntryInstr* GetBlock() const; |
| + |
| // Printing support. These functions are sometimes overridden for custom |
| // formatting. Otherwise, it prints in the format "opcode(op1, op2, op3)". |
| virtual void PrintTo(BufferFormatter* f) const; |
| @@ -1036,6 +1052,8 @@ |
| } |
| } |
| + // Get the block entry for that instruction. |
| + virtual BlockEntryInstr* GetBlock() const { return block(); } |
| JoinEntryInstr* block() const { return block_; } |
| virtual RawAbstractType* CompileType() const; |
| @@ -1097,12 +1115,16 @@ |
| class ParameterInstr : public Definition { |
| public: |
| - explicit ParameterInstr(intptr_t index) : index_(index) { } |
| + explicit ParameterInstr(intptr_t index, GraphEntryInstr* block) |
| + : index_(index), block_(block) { } |
| DECLARE_INSTRUCTION(Parameter) |
| intptr_t index() const { return index_; } |
| + // Get the block entry for that instruction. |
| + virtual BlockEntryInstr* GetBlock() const { return block_; } |
| + |
| // Compile type of the passed-in parameter. |
| virtual RawAbstractType* CompileType() const; |
| @@ -1135,6 +1157,7 @@ |
| private: |
| const intptr_t index_; |
| + GraphEntryInstr* block_; |
| DISALLOW_COPY_AND_ASSIGN(ParameterInstr); |
| }; |