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

Side by Side Diff: src/compiler/raw-machine-assembler.cc

Issue 460633002: Remove duplication in Scheduler and simplify interface. Make ComputeSchedule() and ComputeSpecialRP… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/scheduler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 #include "src/compiler/raw-machine-assembler.h" 6 #include "src/compiler/raw-machine-assembler.h"
7 #include "src/compiler/scheduler.h" 7 #include "src/compiler/scheduler.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 16 matching lines...) Expand all
27 parameters_ = zone()->NewArray<Node*>(parameter_count()); 27 parameters_ = zone()->NewArray<Node*>(parameter_count());
28 for (int i = 0; i < parameter_count(); ++i) { 28 for (int i = 0; i < parameter_count(); ++i) {
29 parameters_[i] = NewNode(common()->Parameter(i), graph->start()); 29 parameters_[i] = NewNode(common()->Parameter(i), graph->start());
30 } 30 }
31 } 31 }
32 32
33 33
34 Schedule* RawMachineAssembler::Export() { 34 Schedule* RawMachineAssembler::Export() {
35 // Compute the correct codegen order. 35 // Compute the correct codegen order.
36 DCHECK(schedule_->rpo_order()->empty()); 36 DCHECK(schedule_->rpo_order()->empty());
37 Scheduler scheduler(zone(), graph(), schedule_); 37 Scheduler::ComputeSpecialRPO(schedule_);
38 scheduler.ComputeSpecialRPO();
39 // Invalidate MachineAssembler. 38 // Invalidate MachineAssembler.
40 Schedule* schedule = schedule_; 39 Schedule* schedule = schedule_;
41 schedule_ = NULL; 40 schedule_ = NULL;
42 return schedule; 41 return schedule;
43 } 42 }
44 43
45 44
46 Node* RawMachineAssembler::Parameter(int index) { 45 Node* RawMachineAssembler::Parameter(int index) {
47 DCHECK(0 <= index && index < parameter_count()); 46 DCHECK(0 <= index && index < parameter_count());
48 return parameters_[index]; 47 return parameters_[index];
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 Node* node = graph()->NewNode(op, input_count, inputs); 149 Node* node = graph()->NewNode(op, input_count, inputs);
151 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start() 150 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start()
152 : CurrentBlock(); 151 : CurrentBlock();
153 schedule()->AddNode(block, node); 152 schedule()->AddNode(block, node);
154 return node; 153 return node;
155 } 154 }
156 155
157 } // namespace compiler 156 } // namespace compiler
158 } // namespace internal 157 } // namespace internal
159 } // namespace v8 158 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698