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

Unified Diff: src/compiler/instruction-selector.cc

Issue 951553005: [turbofan] remove dependence of InstructionBlock on BasicBlock (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « src/compiler/instruction-selector.h ('k') | src/compiler/instruction-selector-impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index edb9943d34f3e3837592e62cb1f18aea9b377489..ae73df853bce85b08a54207265cfb5d22cd74e9d 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -10,6 +10,7 @@
#include "src/compiler/node-matchers.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/pipeline.h"
+#include "src/compiler/schedule.h"
namespace v8 {
namespace internal {
@@ -61,15 +62,15 @@ void InstructionSelector::SelectInstructions() {
// Schedule the selected instructions.
for (auto const block : *blocks) {
InstructionBlock* instruction_block =
- sequence()->InstructionBlockAt(block->GetRpoNumber());
+ sequence()->InstructionBlockAt(RpoNumber::FromInt(block->rpo_number()));
size_t end = instruction_block->code_end();
size_t start = instruction_block->code_start();
DCHECK_LE(end, start);
- sequence()->StartBlock(block->GetRpoNumber());
+ sequence()->StartBlock(RpoNumber::FromInt(block->rpo_number()));
while (start-- > end) {
sequence()->AddInstruction(instructions_[start]);
}
- sequence()->EndBlock(block->GetRpoNumber());
+ sequence()->EndBlock(RpoNumber::FromInt(block->rpo_number()));
}
}
@@ -477,7 +478,7 @@ void InstructionSelector::VisitBlock(BasicBlock* block) {
// We're done with the block.
InstructionBlock* instruction_block =
- sequence()->InstructionBlockAt(block->GetRpoNumber());
+ sequence()->InstructionBlockAt(RpoNumber::FromInt(block->rpo_number()));
instruction_block->set_code_start(static_cast<int>(instructions_.size()));
instruction_block->set_code_end(current_block_end);
@@ -1032,7 +1033,9 @@ void InstructionSelector::VisitPhi(Node* node) {
PhiInstruction* phi = new (instruction_zone())
PhiInstruction(instruction_zone(), GetVirtualRegister(node),
static_cast<size_t>(input_count));
- sequence()->InstructionBlockAt(current_block_->GetRpoNumber())->AddPhi(phi);
+ sequence()
+ ->InstructionBlockAt(RpoNumber::FromInt(current_block_->rpo_number()))
+ ->AddPhi(phi);
for (int i = 0; i < input_count; ++i) {
Node* const input = node->InputAt(i);
MarkAsUsed(input);
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | src/compiler/instruction-selector-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698