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

Side by Side Diff: src/compiler/pipeline.cc

Issue 511713003: Wire up simplified and change lowering in pipeline. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | 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 6
7 #include "src/base/platform/elapsed-timer.h" 7 #include "src/base/platform/elapsed-timer.h"
8 #include "src/compiler/ast-graph-builder.h" 8 #include "src/compiler/ast-graph-builder.h"
9 #include "src/compiler/change-lowering.h"
9 #include "src/compiler/code-generator.h" 10 #include "src/compiler/code-generator.h"
10 #include "src/compiler/graph-replay.h" 11 #include "src/compiler/graph-replay.h"
11 #include "src/compiler/graph-visualizer.h" 12 #include "src/compiler/graph-visualizer.h"
12 #include "src/compiler/instruction.h" 13 #include "src/compiler/instruction.h"
13 #include "src/compiler/instruction-selector.h" 14 #include "src/compiler/instruction-selector.h"
14 #include "src/compiler/js-context-specialization.h" 15 #include "src/compiler/js-context-specialization.h"
15 #include "src/compiler/js-generic-lowering.h" 16 #include "src/compiler/js-generic-lowering.h"
16 #include "src/compiler/js-inlining.h" 17 #include "src/compiler/js-inlining.h"
17 #include "src/compiler/js-typed-lowering.h" 18 #include "src/compiler/js-typed-lowering.h"
18 #include "src/compiler/phi-reducer.h" 19 #include "src/compiler/phi-reducer.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 "typed lowering"); 227 "typed lowering");
227 SourcePositionTable::Scope pos(&source_positions, 228 SourcePositionTable::Scope pos(&source_positions,
228 SourcePosition::Unknown()); 229 SourcePosition::Unknown());
229 JSTypedLowering lowering(&jsgraph); 230 JSTypedLowering lowering(&jsgraph);
230 GraphReducer graph_reducer(&graph); 231 GraphReducer graph_reducer(&graph);
231 graph_reducer.AddReducer(&lowering); 232 graph_reducer.AddReducer(&lowering);
232 graph_reducer.ReduceGraph(); 233 graph_reducer.ReduceGraph();
233 234
234 VerifyAndPrintGraph(&graph, "Lowered typed"); 235 VerifyAndPrintGraph(&graph, "Lowered typed");
235 } 236 }
237 {
238 // Lower simplified operators and insert changes.
239 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
240 "simplified lowering");
241 SourcePositionTable::Scope pos(&source_positions,
242 SourcePosition::Unknown());
243 SimplifiedLowering lowering(&jsgraph);
244 lowering.LowerAllNodes();
245
246 VerifyAndPrintGraph(&graph, "Lowered simplified");
247 }
248 {
249 // Lower changes that have been inserted before.
250 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
251 "change lowering");
252 SourcePositionTable::Scope pos(&source_positions,
253 SourcePosition::Unknown());
254 Linkage linkage(info());
255 MachineOperatorBuilder machine(zone());
256 ChangeLowering lowering(&jsgraph, &linkage, &machine);
257 GraphReducer graph_reducer(&graph);
258 graph_reducer.AddReducer(&lowering);
259 graph_reducer.ReduceGraph();
260
261 VerifyAndPrintGraph(&graph, "Lowered changes");
262 }
236 } 263 }
237 264
238 Handle<Code> code = Handle<Code>::null(); 265 Handle<Code> code = Handle<Code>::null();
239 if (SupportedTarget()) { 266 if (SupportedTarget()) {
240 { 267 {
241 // Lower any remaining generic JSOperators. 268 // Lower any remaining generic JSOperators.
242 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH, 269 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
243 "generic lowering"); 270 "generic lowering");
244 SourcePositionTable::Scope pos(&source_positions, 271 SourcePositionTable::Scope pos(&source_positions,
245 SourcePosition::Unknown()); 272 SourcePosition::Unknown());
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 } 390 }
364 391
365 392
366 void Pipeline::TearDown() { 393 void Pipeline::TearDown() {
367 InstructionOperand::TearDownCaches(); 394 InstructionOperand::TearDownCaches();
368 } 395 }
369 396
370 } // namespace compiler 397 } // namespace compiler
371 } // namespace internal 398 } // namespace internal
372 } // namespace v8 399 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698