Revision: 24726
Author: [email protected]
Date: Mon Oct 20 10:19:15 2014 UTC
Log: [turbofan] remove schedule from InstructionSequence
[email protected]
BUG=
Review URL: https://codereview.chromium.org/669613002
https://code.google.com/p/v8/source/detail?r=24726
Modified:
/branches/bleeding_edge/src/compiler/code-generator.h
/branches/bleeding_edge/src/compiler/graph-visualizer.cc
/branches/bleeding_edge/src/compiler/instruction-selector.cc
/branches/bleeding_edge/src/compiler/instruction-selector.h
/branches/bleeding_edge/src/compiler/instruction.cc
/branches/bleeding_edge/src/compiler/instruction.h
/branches/bleeding_edge/src/compiler/pipeline.cc
/branches/bleeding_edge/src/compiler/schedule.cc
/branches/bleeding_edge/src/compiler/schedule.h
/branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc
/branches/bleeding_edge/test/cctest/compiler/test-instruction.cc
/branches/bleeding_edge/test/unittests/compiler/instruction-selector-unittest.cc
=======================================
--- /branches/bleeding_edge/src/compiler/code-generator.h Tue Oct 14
08:51:22 2014 UTC
+++ /branches/bleeding_edge/src/compiler/code-generator.h Mon Oct 20
10:19:15 2014 UTC
@@ -29,7 +29,6 @@
Frame* frame() const { return code()->frame(); }
Isolate* isolate() const { return zone()->isolate(); }
Linkage* linkage() const { return code()->linkage(); }
- Schedule* schedule() const { return code()->schedule(); }
private:
MacroAssembler* masm() { return &masm_; }
=======================================
--- /branches/bleeding_edge/src/compiler/graph-visualizer.cc Thu Oct 16
06:59:39 2014 UTC
+++ /branches/bleeding_edge/src/compiler/graph-visualizer.cc Mon Oct 20
10:19:15 2014 UTC
@@ -593,9 +593,11 @@
PrintIntProperty("loop_depth", current->loop_depth());
- if (instructions->code_start(current) >= 0) {
- int first_index = instructions->first_instruction_index(current);
- int last_index = instructions->last_instruction_index(current);
+ const InstructionBlock* instruction_block =
+ instructions->InstructionBlockAt(current->GetRpoNumber());
+ if (instruction_block->code_start() >= 0) {
+ int first_index = instruction_block->first_instruction_index();
+ int last_index = instruction_block->last_instruction_index();
PrintIntProperty("first_lir_id",
LifetimePosition::FromInstructionIndex(
first_index).Value());
PrintIntProperty("last_lir_id",
LifetimePosition::FromInstructionIndex(
@@ -674,8 +676,8 @@
if (instructions != NULL) {
Tag LIR_tag(this, "LIR");
- for (int j = instructions->first_instruction_index(current);
- j <= instructions->last_instruction_index(current); j++) {
+ for (int j = instruction_block->first_instruction_index();
+ j <= instruction_block->last_instruction_index(); j++) {
PrintIndent();
os_ << j << " " << *instructions->InstructionAt(j) << " <|@\n";
}
=======================================
--- /branches/bleeding_edge/src/compiler/instruction-selector.cc Mon Oct 20
07:32:01 2014 UTC
+++ /branches/bleeding_edge/src/compiler/instruction-selector.cc Mon Oct 20
10:19:15 2014 UTC
@@ -14,12 +14,14 @@
namespace compiler {
InstructionSelector::InstructionSelector(InstructionSequence* sequence,
+ Schedule* schedule,
SourcePositionTable*
source_positions,
Features features)
: zone_(sequence->isolate()),
sequence_(sequence),
source_positions_(source_positions),
features_(features),
+ schedule_(schedule),
current_block_(NULL),
instructions_(zone()),
defined_(sequence->node_count(), false, zone()),
@@ -55,8 +57,10 @@
// Schedule the selected instructions.
for (BasicBlockVectorIter i = blocks->begin(); i != blocks->end(); ++i) {
BasicBlock* block = *i;
- size_t end = sequence()->code_end(block);
- size_t start = sequence()->code_start(block);
+ InstructionBlock* instruction_block =
+ sequence()->InstructionBlockAt(block->GetRpoNumber());
+ size_t end = instruction_block->code_end();
+ size_t start = instruction_block->code_start();
sequence()->StartBlock(block);
while (start-- > end) {
sequence()->AddInstruction(instructions_[start]);
@@ -383,8 +387,10 @@
}
// We're done with the block.
- sequence()->set_code_start(block,
static_cast<int>(instructions_.size()));
- sequence()->set_code_end(block, current_block_end);
+ InstructionBlock* instruction_block =
+ sequence()->InstructionBlockAt(block->GetRpoNumber());
+
instruction_block->set_code_start(static_cast<int>(instructions_.size()));
+ instruction_block->set_code_end(current_block_end);
current_block_ = NULL;
}
@@ -856,14 +862,12 @@
PhiInstruction* phi = new (instruction_zone())
PhiInstruction(instruction_zone(),
sequence()->GetVirtualRegister(node));
sequence()->InstructionBlockAt(current_block_->GetRpoNumber())->AddPhi(phi);
- Node::Inputs inputs = node->inputs();
- size_t j = 0;
- for (Node::Inputs::iterator iter(inputs.begin()); iter != inputs.end();
- ++iter, ++j) {
- MarkAsUsed(*iter);
- // TODO(mstarzinger): Use a ValueInputIterator instead.
- if (j >= current_block_->PredecessorCount()) continue;
- phi->operands().push_back(sequence()->GetVirtualRegister(*iter));
+ const int input_count = node->op()->InputCount();
+ phi->operands().reserve(static_cast<size_t>(input_count));
+ for (int i = 0; i < input_count; ++i) {
+ Node* const input = node->InputAt(i);
+ MarkAsUsed(input);
+ phi->operands().push_back(sequence()->GetVirtualRegister(input));
}
}
=======================================
--- /branches/bleeding_edge/src/compiler/instruction-selector.h Mon Oct 13
08:15:03 2014 UTC
+++ /branches/bleeding_edge/src/compiler/instruction-selector.h Mon Oct 20
10:19:15 2014 UTC
@@ -25,7 +25,7 @@
// Forward declarations.
class Features;
- InstructionSelector(InstructionSequence* sequence,
+ InstructionSelector(InstructionSequence* sequence, Schedule* schedule,
SourcePositionTable* source_positions,
Features features = SupportedFeatures());
@@ -184,7 +184,7 @@
//
===========================================================================
Linkage* linkage() const { return sequence()->linkage(); }
- Schedule* schedule() const { return sequence()->schedule(); }
+ Schedule* schedule() const { return schedule_; }
InstructionSequence* sequence() const { return sequence_; }
Zone* instruction_zone() const { return sequence()->zone(); }
Zone* zone() { return &zone_; }
@@ -195,6 +195,7 @@
InstructionSequence* sequence_;
SourcePositionTable* source_positions_;
Features features_;
+ Schedule* schedule_;
BasicBlock* current_block_;
ZoneDeque<Instruction*> instructions_;
BoolVector defined_;
=======================================
--- /branches/bleeding_edge/src/compiler/instruction.cc Mon Oct 20 07:43:56
2014 UTC
+++ /branches/bleeding_edge/src/compiler/instruction.cc Mon Oct 20 10:19:15
2014 UTC
@@ -335,6 +335,7 @@
predecessors_(static_cast<int>(block->PredecessorCount()),
BasicBlock::RpoNumber::Invalid(), zone),
phis_(zone),
+ id_(block->id()),
rpo_number_(block->GetRpoNumber()),
loop_header_(GetRpo(block->loop_header())),
loop_end_(GetLoopEndRpo(block)),
@@ -379,15 +380,14 @@
}
-InstructionSequence::InstructionSequence(Linkage* linkage, Graph* graph,
- Schedule* schedule)
- : zone_(schedule->zone()), // TODO(dcarney): new zone.
+InstructionSequence::InstructionSequence(Linkage* linkage, const Graph*
graph,
+ const Schedule* schedule)
+ : zone_(graph->zone()->isolate()),
node_count_(graph->NodeCount()),
node_map_(zone()->NewArray<int>(node_count_)),
instruction_blocks_(static_cast<int>(schedule->rpo_order()->size()),
NULL,
zone()),
linkage_(linkage),
- schedule_(schedule),
constants_(ConstantMap::key_compare(),
ConstantMap::allocator_type(zone())),
immediates_(zone()),
@@ -419,25 +419,28 @@
BlockStartInstruction* InstructionSequence::GetBlockStart(
BasicBlock::RpoNumber rpo) {
+ InstructionBlock* block = InstructionBlockAt(rpo);
BlockStartInstruction* block_start =
- BlockStartInstruction::cast(InstructionAt(code_start(rpo)));
+ BlockStartInstruction::cast(InstructionAt(block->code_start()));
DCHECK_EQ(rpo.ToInt(), block_start->rpo_number().ToInt());
return block_start;
}
-void InstructionSequence::StartBlock(BasicBlock* block) {
- set_code_start(block, static_cast<int>(instructions_.size()));
+void InstructionSequence::StartBlock(BasicBlock* basic_block) {
+ InstructionBlock* block =
InstructionBlockAt(basic_block->GetRpoNumber());
+ block->set_code_start(static_cast<int>(instructions_.size()));
BlockStartInstruction* block_start =
- BlockStartInstruction::New(zone(), block);
+ BlockStartInstruction::New(zone(), basic_block);
AddInstruction(block_start);
}
-void InstructionSequence::EndBlock(BasicBlock* block) {
+void InstructionSequence::EndBlock(BasicBlock* basic_block) {
int end = static_cast<int>(instructions_.size());
- DCHECK(code_start(block) >= 0 && code_start(block) < end);
- set_code_end(block, end);
+ InstructionBlock* block =
InstructionBlockAt(basic_block->GetRpoNumber());
+ DCHECK(block->code_start() >= 0 && block->code_start() < end);
+ block->set_code_end(end);
}
@@ -457,19 +460,6 @@
}
return index;
}
-
-
-BasicBlock* InstructionSequence::GetBasicBlock(int instruction_index) {
- // TODO(turbofan): Optimize this.
- for (;;) {
- DCHECK_LE(0, instruction_index);
- Instruction* instruction = InstructionAt(instruction_index--);
- if (instruction->IsBlockStart()) {
- return schedule()->rpo_order()->at(
- BlockStartInstruction::cast(instruction)->rpo_number().ToSize());
- }
- }
-}
const InstructionBlock* InstructionSequence::GetInstructionBlock(
@@ -614,53 +604,50 @@
os << "CST#" << i << ": v" << it->first << " = " << it->second << "\n";
}
for (int i = 0; i < code.BasicBlockCount(); i++) {
- BasicBlock* block = code.BlockAt(i);
+ BasicBlock::RpoNumber rpo = BasicBlock::RpoNumber::FromInt(i);
+ const InstructionBlock* block = code.InstructionBlockAt(rpo);
+ CHECK(block->rpo_number() == rpo);
os << "RPO#" << block->rpo_number() << ": B" << block->id();
- CHECK(block->rpo_number() == i);
if (block->IsLoopHeader()) {
os << " loop blocks: [" << block->rpo_number() << ", "
<< block->loop_end() << ")";
}
- os << " instructions: [" << code.code_start(block) << ", "
- << code.code_end(block) << ")\n predecessors:";
+ os << " instructions: [" << block->code_start() << ", "
+ << block->code_end() << ")\n predecessors:";
- for (BasicBlock::Predecessors::iterator iter =
block->predecessors_begin();
- iter != block->predecessors_end(); ++iter) {
- os << " B" << (*iter)->id();
+ for (auto pred : block->predecessors()) {
+ const InstructionBlock* pred_block = code.InstructionBlockAt(pred);
+ os << " B" << pred_block->id();
}
os << "\n";
- for (BasicBlock::const_iterator j = block->begin(); j != block->end();
- ++j) {
- Node* phi = *j;
- if (phi->opcode() != IrOpcode::kPhi) continue;
- os << " phi: v" << phi->id() << " =";
- Node::Inputs inputs = phi->inputs();
- for (Node::Inputs::iterator iter(inputs.begin()); iter !=
inputs.end();
- ++iter) {
- os << " v" << (*iter)->id();
+ for (auto phi : block->phis()) {
+ os << " phi: v" << phi->virtual_register() << " =";
+ for (auto op_vreg : phi->operands()) {
+ os << " v" << op_vreg;
}
os << "\n";
}
ScopedVector<char> buf(32);
- for (int j = code.first_instruction_index(block);
- j <= code.last_instruction_index(block); j++) {
+ for (int j = block->first_instruction_index();
+ j <= block->last_instruction_index(); j++) {
// TODO(svenpanne) Add some basic formatting to our streams.
SNPrintF(buf, "%5d", j);
os << " " << buf.start() << ": " << *code.InstructionAt(j) << "\n";
}
- os << " " << block->control();
+ // TODO(dcarney): add this back somehow?
+ // os << " " << block->control();
- if (block->control_input() != NULL) {
- os << " v" << block->control_input()->id();
- }
+ // if (block->control_input() != NULL) {
+ // os << " v" << block->control_input()->id();
+ // }
- for (BasicBlock::Successors::iterator iter = block->successors_begin();
- iter != block->successors_end(); ++iter) {
- os << " B" << (*iter)->id();
+ for (auto succ : block->successors()) {
+ const InstructionBlock* succ_block = code.InstructionBlockAt(succ);
+ os << " B" << succ_block->id();
}
os << "\n";
}
=======================================
--- /branches/bleeding_edge/src/compiler/instruction.h Mon Oct 20 07:32:01
2014 UTC
+++ /branches/bleeding_edge/src/compiler/instruction.h Mon Oct 20 10:19:15
2014 UTC
@@ -755,7 +755,7 @@
// TODO(dcarney): this is a temporary hack. turn into an actual
instruction.
-class PhiInstruction : public ZoneObject {
+class PhiInstruction FINAL : public ZoneObject {
public:
PhiInstruction(Zone* zone, int virtual_register)
: virtual_register_(virtual_register), operands_(zone) {}
@@ -771,7 +771,7 @@
// Analogue of BasicBlock for Instructions instead of Nodes.
-class InstructionBlock : public ZoneObject {
+class InstructionBlock FINAL : public ZoneObject {
public:
explicit InstructionBlock(Zone* zone, const BasicBlock* block);
@@ -795,6 +795,7 @@
int32_t code_end() const { return code_end_; }
void set_code_end(int32_t end) { code_end_ = end; }
+ BasicBlock::Id id() const { return id_; }
BasicBlock::RpoNumber rpo_number() const { return rpo_number_; }
BasicBlock::RpoNumber loop_header() const { return loop_header_; }
BasicBlock::RpoNumber loop_end() const {
@@ -820,6 +821,7 @@
Successors successors_;
Predecessors predecessors_;
PhiInstructions phis_;
+ BasicBlock::Id id_;
// TODO(dcarney): probably dont't need this.
BasicBlock::RpoNumber rpo_number_;
BasicBlock::RpoNumber loop_header_;
@@ -842,7 +844,8 @@
// TODO(titzer): s/IsDouble/IsFloat64/
class InstructionSequence FINAL {
public:
- InstructionSequence(Linkage* linkage, Graph* graph, Schedule* schedule);
+ InstructionSequence(Linkage* linkage, const Graph* graph,
+ const Schedule* schedule);
int NextVirtualRegister() { return next_virtual_register_++; }
int VirtualRegisterCount() const { return next_virtual_register_; }
@@ -852,18 +855,14 @@
int BasicBlockCount() const {
return static_cast<int>(instruction_blocks_.size());
}
-
- BasicBlock* BlockAt(int rpo_number) const {
- return (*schedule_->rpo_order())[rpo_number];
- }
InstructionBlock* InstructionBlockAt(BasicBlock::RpoNumber rpo_number) {
- return GetBlock(rpo_number);
+ return instruction_blocks_[rpo_number.ToSize()];
}
const InstructionBlock* InstructionBlockAt(
BasicBlock::RpoNumber rpo_number) const {
- return GetBlock(rpo_number);
+ return instruction_blocks_[rpo_number.ToSize()];
}
// TODO(dcarney): move to register allocator.
@@ -874,7 +873,6 @@
return instruction_blocks_[index.ToInt()];
}
- BasicBlock* GetBasicBlock(int instruction_index);
const InstructionBlock* GetInstructionBlock(int instruction_index) const;
int GetVirtualRegister(const Node* node);
@@ -907,44 +905,15 @@
}
Frame* frame() { return &frame_; }
- Isolate* isolate() const { return zone()->isolate(); }
+ Isolate* isolate() { return zone()->isolate(); }
Linkage* linkage() const { return linkage_; }
- Schedule* schedule() const { return schedule_; }
const PointerMapDeque* pointer_maps() const { return &pointer_maps_; }
- Zone* zone() const { return zone_; }
+ Zone* zone() { return &zone_; }
// Used by the instruction selector while adding instructions.
int AddInstruction(Instruction* instr);
void StartBlock(BasicBlock* block);
void EndBlock(BasicBlock* block);
- void set_code_start(BasicBlock* block, int start) {
- return GetBlock(block->GetRpoNumber())->set_code_start(start);
- }
- void set_code_end(BasicBlock* block, int end) {
- return GetBlock(block->GetRpoNumber())->set_code_end(end);
- }
- // TODO(dcarney): use RpoNumber for all of the below.
- int code_start(BasicBlock::RpoNumber rpo_number) const {
- return GetBlock(rpo_number)->code_start();
- }
- int code_start(BasicBlock* block) const {
- return GetBlock(block->GetRpoNumber())->code_start();
- }
- int code_end(BasicBlock* block) const {
- return GetBlock(block->GetRpoNumber())->code_end();
- }
- int first_instruction_index(BasicBlock* block) const {
- return GetBlock(block->GetRpoNumber())->first_instruction_index();
- }
- int last_instruction_index(BasicBlock* block) const {
- return GetBlock(block->GetRpoNumber())->last_instruction_index();
- }
- int first_instruction_index(InstructionBlock* block) const {
- return GetBlock(block->rpo_number())->first_instruction_index();
- }
- int last_instruction_index(InstructionBlock* block) const {
- return GetBlock(block->rpo_number())->last_instruction_index();
- }
int AddConstant(Node* node, Constant constant) {
int virtual_register = GetVirtualRegister(node);
@@ -988,21 +957,16 @@
int GetFrameStateDescriptorCount();
private:
- InstructionBlock* GetBlock(BasicBlock::RpoNumber rpo_number) const {
- return instruction_blocks_[rpo_number.ToSize()];
- }
-
friend std::ostream& operator<<(std::ostream& os,
const InstructionSequence& code);
typedef std::set<int, std::less<int>, ZoneIntAllocator>
VirtualRegisterSet;
- Zone* zone_;
+ Zone zone_;
int node_count_;
int* node_map_;
InstructionBlocks instruction_blocks_;
Linkage* linkage_;
- Schedule* schedule_;
ConstantMap constants_;
ConstantDeque immediates_;
InstructionDeque instructions_;
=======================================
--- /branches/bleeding_edge/src/compiler/pipeline.cc Fri Oct 17 11:51:57
2014 UTC
+++ /branches/bleeding_edge/src/compiler/pipeline.cc Mon Oct 20 10:19:15
2014 UTC
@@ -457,7 +457,7 @@
// Select and schedule instructions covering the scheduled graph.
{
- InstructionSelector selector(&sequence, source_positions);
+ InstructionSelector selector(&sequence, schedule, source_positions);
selector.SelectInstructions();
}
=======================================
--- /branches/bleeding_edge/src/compiler/schedule.cc Mon Oct 20 07:32:01
2014 UTC
+++ /branches/bleeding_edge/src/compiler/schedule.cc Mon Oct 20 10:19:15
2014 UTC
@@ -103,6 +103,11 @@
std::ostream& operator<<(std::ostream& os, const BasicBlock::Id& id) {
return os << id.ToSize();
}
+
+
+std::ostream& operator<<(std::ostream& os, const BasicBlock::RpoNumber&
rpo) {
+ return os << rpo.ToSize();
+}
Schedule::Schedule(Zone* zone, size_t node_count_hint)
=======================================
--- /branches/bleeding_edge/src/compiler/schedule.h Mon Oct 20 07:32:01
2014 UTC
+++ /branches/bleeding_edge/src/compiler/schedule.h Mon Oct 20 10:19:15
2014 UTC
@@ -182,6 +182,7 @@
std::ostream& operator<<(std::ostream& os, const BasicBlock::Control& c);
std::ostream& operator<<(std::ostream& os, const BasicBlock::Id& id);
+std::ostream& operator<<(std::ostream& os, const BasicBlock::RpoNumber&
rpo);
typedef ZoneVector<BasicBlock*> BasicBlockVector;
typedef BasicBlockVector::iterator BasicBlockVectorIter;
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc Tue
Oct 7 13:30:28 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-codegen-deopt.cc Mon
Oct 20 10:19:15 2014 UTC
@@ -68,7 +68,7 @@
code = new v8::internal::compiler::InstructionSequence(linkage, graph,
schedule);
SourcePositionTable source_positions(graph);
- InstructionSelector selector(code, &source_positions);
+ InstructionSelector selector(code, schedule, &source_positions);
selector.SelectInstructions();
if (FLAG_trace_turbo) {
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-instruction.cc Tue
Oct 14 08:51:22 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-instruction.cc Mon
Oct 20 10:19:15 2014 UTC
@@ -93,6 +93,21 @@
unallocated->set_virtual_register(vreg);
return unallocated;
}
+
+ InstructionBlock* BlockAt(BasicBlock* block) {
+ return code->InstructionBlockAt(block->GetRpoNumber());
+ }
+ BasicBlock* GetBasicBlock(int instruction_index) {
+ const InstructionBlock* block =
+ code->GetInstructionBlock(instruction_index);
+ return schedule.rpo_order()->at(block->rpo_number().ToSize());
+ }
+ int first_instruction_index(BasicBlock* block) {
+ return BlockAt(block)->first_instruction_index();
+ }
+ int last_instruction_index(BasicBlock* block) {
+ return BlockAt(block)->last_instruction_index();
+ }
};
@@ -121,7 +136,8 @@
for (BasicBlockVectorIter i = blocks->begin(); i != blocks->end();
i++, index++) {
BasicBlock* block = *i;
- CHECK_EQ(block, R.code->BlockAt(index));
+ CHECK_EQ(block->rpo_number(), R.BlockAt(block)->rpo_number().ToInt());
+ CHECK_EQ(block->id().ToInt(), R.BlockAt(block)->id().ToInt());
CHECK_EQ(-1, block->loop_end());
}
}
@@ -159,29 +175,29 @@
R.code->StartBlock(b3);
R.code->EndBlock(b3);
- CHECK_EQ(b0, R.code->GetBasicBlock(i0));
- CHECK_EQ(b0, R.code->GetBasicBlock(i1));
+ CHECK_EQ(b0, R.GetBasicBlock(i0));
+ CHECK_EQ(b0, R.GetBasicBlock(i1));
- CHECK_EQ(b1, R.code->GetBasicBlock(i2));
- CHECK_EQ(b1, R.code->GetBasicBlock(i3));
- CHECK_EQ(b1, R.code->GetBasicBlock(i4));
- CHECK_EQ(b1, R.code->GetBasicBlock(i5));
+ CHECK_EQ(b1, R.GetBasicBlock(i2));
+ CHECK_EQ(b1, R.GetBasicBlock(i3));
+ CHECK_EQ(b1, R.GetBasicBlock(i4));
+ CHECK_EQ(b1, R.GetBasicBlock(i5));
- CHECK_EQ(b2, R.code->GetBasicBlock(i6));
- CHECK_EQ(b2, R.code->GetBasicBlock(i7));
- CHECK_EQ(b2, R.code->GetBasicBlock(i8));
+ CHECK_EQ(b2, R.GetBasicBlock(i6));
+ CHECK_EQ(b2, R.GetBasicBlock(i7));
+ CHECK_EQ(b2, R.GetBasicBlock(i8));
- CHECK_EQ(b0, R.code->GetBasicBlock(R.code->first_instruction_index(b0)));
- CHECK_EQ(b0, R.code->GetBasicBlock(R.code->last_instruction_index(b0)));
+ CHECK_EQ(b0, R.GetBasicBlock(R.first_instruction_index(b0)));
+ CHECK_EQ(b0, R.GetBasicBlock(R.last_instruction_index(b0)));
- CHECK_EQ(b1, R.code->GetBasicBlock(R.code->first_instruction_index(b1)));
- CHECK_EQ(b1, R.code->GetBasicBlock(R.code->last_instruction_index(b1)));
+ CHECK_EQ(b1, R.GetBasicBlock(R.first_instruction_index(b1)));
+ CHECK_EQ(b1, R.GetBasicBlock(R.last_instruction_index(b1)));
- CHECK_EQ(b2, R.code->GetBasicBlock(R.code->first_instruction_index(b2)));
- CHECK_EQ(b2, R.code->GetBasicBlock(R.code->last_instruction_index(b2)));
+ CHECK_EQ(b2, R.GetBasicBlock(R.first_instruction_index(b2)));
+ CHECK_EQ(b2, R.GetBasicBlock(R.last_instruction_index(b2)));
- CHECK_EQ(b3, R.code->GetBasicBlock(R.code->first_instruction_index(b3)));
- CHECK_EQ(b3, R.code->GetBasicBlock(R.code->last_instruction_index(b3)));
+ CHECK_EQ(b3, R.GetBasicBlock(R.first_instruction_index(b3)));
+ CHECK_EQ(b3, R.GetBasicBlock(R.last_instruction_index(b3)));
}
=======================================
---
/branches/bleeding_edge/test/unittests/compiler/instruction-selector-unittest.cc
Wed Oct 8 08:47:29 2014 UTC
+++
/branches/bleeding_edge/test/unittests/compiler/instruction-selector-unittest.cc
Mon Oct 20 10:19:15 2014 UTC
@@ -40,7 +40,8 @@
Linkage linkage(&info, call_descriptor());
InstructionSequence sequence(&linkage, graph(), schedule);
SourcePositionTable source_position_table(graph());
- InstructionSelector selector(&sequence, &source_position_table,
features);
+ InstructionSelector selector(&sequence, schedule, &source_position_table,
+ features);
selector.SelectInstructions();
if (FLAG_trace_turbo) {
OFStream out(stdout);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.