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

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

Issue 711413002: Simplify scheduler API by removing zone scopes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Created 6 years, 1 month 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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compiler/pipeline.h" 6 #include "src/compiler/pipeline.h"
7 #include "src/compiler/raw-machine-assembler.h" 7 #include "src/compiler/raw-machine-assembler.h"
8 #include "src/compiler/scheduler.h" 8 #include "src/compiler/scheduler.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 22 matching lines...) Expand all
33 for (size_t i = 0; i < parameter_count(); ++i) { 33 for (size_t i = 0; i < parameter_count(); ++i) {
34 parameters_[i] = 34 parameters_[i] =
35 NewNode(common()->Parameter(static_cast<int>(i)), graph->start()); 35 NewNode(common()->Parameter(static_cast<int>(i)), graph->start());
36 } 36 }
37 } 37 }
38 38
39 39
40 Schedule* RawMachineAssembler::Export() { 40 Schedule* RawMachineAssembler::Export() {
41 // Compute the correct codegen order. 41 // Compute the correct codegen order.
42 DCHECK(schedule_->rpo_order()->empty()); 42 DCHECK(schedule_->rpo_order()->empty());
43 ZonePool zone_pool(isolate()); 43 Scheduler::ComputeSpecialRPO(zone(), schedule_);
44 Scheduler::ComputeSpecialRPO(&zone_pool, schedule_);
45 // Invalidate MachineAssembler. 44 // Invalidate MachineAssembler.
46 Schedule* schedule = schedule_; 45 Schedule* schedule = schedule_;
47 schedule_ = NULL; 46 schedule_ = NULL;
48 return schedule; 47 return schedule;
49 } 48 }
50 49
51 50
52 Node* RawMachineAssembler::Parameter(size_t index) { 51 Node* RawMachineAssembler::Parameter(size_t index) {
53 DCHECK(index < parameter_count()); 52 DCHECK(index < parameter_count());
54 return parameters_[index]; 53 return parameters_[index];
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 Node* node = graph()->NewNode(op, input_count, inputs, incomplete); 158 Node* node = graph()->NewNode(op, input_count, inputs, incomplete);
160 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start() 159 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start()
161 : CurrentBlock(); 160 : CurrentBlock();
162 schedule()->AddNode(block, node); 161 schedule()->AddNode(block, node);
163 return node; 162 return node;
164 } 163 }
165 164
166 } // namespace compiler 165 } // namespace compiler
167 } // namespace internal 166 } // namespace internal
168 } // namespace v8 167 } // 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