Index: src/compiler/instruction.h |
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h |
index 70338858a583df27ac546c83e1f1636ab16ba062..7d8231c205736fa7797c5036c75f330517f8ded7 100644 |
--- a/src/compiler/instruction.h |
+++ b/src/compiler/instruction.h |
@@ -715,6 +715,8 @@ class ReferenceMap final : public ZoneObject { |
std::ostream& operator<<(std::ostream& os, const ReferenceMap& pm); |
+class InstructionBlock; |
+ |
class Instruction final { |
public: |
size_t OutputCount() const { return OutputCountField::decode(bit_field_); } |
@@ -857,6 +859,15 @@ class Instruction final { |
ParallelMove* const* parallel_moves() const { return ¶llel_moves_[0]; } |
ParallelMove** parallel_moves() { return ¶llel_moves_[0]; } |
+ // The block_id may be invalidated in JumpThreading. It is only important for |
+ // register allocation, to avoid searching for blocks from instruction |
+ // indexes. |
+ InstructionBlock* block() const { return block_; } |
+ void set_block(InstructionBlock* block) { |
+ DCHECK_NOT_NULL(block); |
+ block_ = block; |
+ } |
+ |
void Print(const RegisterConfiguration* config) const; |
void Print() const; |
@@ -877,6 +888,7 @@ class Instruction final { |
uint32_t bit_field_; |
ParallelMove* parallel_moves_[2]; |
ReferenceMap* reference_map_; |
+ InstructionBlock* block_; |
InstructionOperand operands_[1]; |
DISALLOW_COPY_AND_ASSIGN(Instruction); |
@@ -1394,7 +1406,6 @@ class InstructionSequence final : public ZoneObject { |
Zone* const zone_; |
InstructionBlocks* const instruction_blocks_; |
SourcePositionMap source_positions_; |
- IntVector block_starts_; |
ConstantMap constants_; |
Immediates immediates_; |
InstructionDeque instructions_; |
@@ -1403,6 +1414,9 @@ class InstructionSequence final : public ZoneObject { |
ZoneVector<MachineRepresentation> representations_; |
DeoptimizationVector deoptimization_entries_; |
+ // Used at construction time |
+ InstructionBlock* current_block_; |
+ |
DISALLOW_COPY_AND_ASSIGN(InstructionSequence); |
}; |