Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Unified Diff: src/compiler/instruction.h

Issue 1896813003: [turbofan] store block id with instruction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/instruction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 &parallel_moves_[0]; }
ParallelMove** parallel_moves() { return &parallel_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);
};
« no previous file with comments | « no previous file | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698