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

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

Issue 539503002: [turbofan] Initial version of ValueNumberingReducer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Nit and clang-format. 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 | « src/compiler/machine-operator.h ('k') | src/compiler/value-numbering-reducer.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 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/change-lowering.h"
10 #include "src/compiler/code-generator.h" 10 #include "src/compiler/code-generator.h"
11 #include "src/compiler/graph-replay.h" 11 #include "src/compiler/graph-replay.h"
12 #include "src/compiler/graph-visualizer.h" 12 #include "src/compiler/graph-visualizer.h"
13 #include "src/compiler/instruction.h" 13 #include "src/compiler/instruction.h"
14 #include "src/compiler/instruction-selector.h" 14 #include "src/compiler/instruction-selector.h"
15 #include "src/compiler/js-context-specialization.h" 15 #include "src/compiler/js-context-specialization.h"
16 #include "src/compiler/js-generic-lowering.h" 16 #include "src/compiler/js-generic-lowering.h"
17 #include "src/compiler/js-inlining.h" 17 #include "src/compiler/js-inlining.h"
18 #include "src/compiler/js-typed-lowering.h" 18 #include "src/compiler/js-typed-lowering.h"
19 #include "src/compiler/machine-operator-reducer.h" 19 #include "src/compiler/machine-operator-reducer.h"
20 #include "src/compiler/phi-reducer.h" 20 #include "src/compiler/phi-reducer.h"
21 #include "src/compiler/register-allocator.h" 21 #include "src/compiler/register-allocator.h"
22 #include "src/compiler/schedule.h" 22 #include "src/compiler/schedule.h"
23 #include "src/compiler/scheduler.h" 23 #include "src/compiler/scheduler.h"
24 #include "src/compiler/simplified-lowering.h" 24 #include "src/compiler/simplified-lowering.h"
25 #include "src/compiler/simplified-operator-reducer.h" 25 #include "src/compiler/simplified-operator-reducer.h"
26 #include "src/compiler/typer.h" 26 #include "src/compiler/typer.h"
27 #include "src/compiler/value-numbering-reducer.h"
27 #include "src/compiler/verifier.h" 28 #include "src/compiler/verifier.h"
28 #include "src/hydrogen.h" 29 #include "src/hydrogen.h"
29 #include "src/ostreams.h" 30 #include "src/ostreams.h"
30 #include "src/utils.h" 31 #include "src/utils.h"
31 32
32 namespace v8 { 33 namespace v8 {
33 namespace internal { 34 namespace internal {
34 namespace compiler { 35 namespace compiler {
35 36
36 class PhaseStats { 37 class PhaseStats {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 VerifyAndPrintGraph(&graph, "Lowered simplified"); 249 VerifyAndPrintGraph(&graph, "Lowered simplified");
249 } 250 }
250 { 251 {
251 // Lower changes that have been inserted before. 252 // Lower changes that have been inserted before.
252 PhaseStats lowering_stats(info(), PhaseStats::OPTIMIZATION, 253 PhaseStats lowering_stats(info(), PhaseStats::OPTIMIZATION,
253 "change lowering"); 254 "change lowering");
254 SourcePositionTable::Scope pos(&source_positions, 255 SourcePositionTable::Scope pos(&source_positions,
255 SourcePosition::Unknown()); 256 SourcePosition::Unknown());
256 Linkage linkage(info()); 257 Linkage linkage(info());
257 MachineOperatorBuilder machine(zone()); 258 MachineOperatorBuilder machine(zone());
259 ValueNumberingReducer vn_reducer(zone());
258 SimplifiedOperatorReducer simple_reducer(&jsgraph, &machine); 260 SimplifiedOperatorReducer simple_reducer(&jsgraph, &machine);
259 ChangeLowering lowering(&jsgraph, &linkage, &machine); 261 ChangeLowering lowering(&jsgraph, &linkage, &machine);
260 MachineOperatorReducer mach_reducer(&jsgraph); 262 MachineOperatorReducer mach_reducer(&jsgraph);
261 GraphReducer graph_reducer(&graph); 263 GraphReducer graph_reducer(&graph);
262 // TODO(titzer): Figure out if we should run all reducers at once here. 264 // TODO(titzer): Figure out if we should run all reducers at once here.
265 graph_reducer.AddReducer(&vn_reducer);
263 graph_reducer.AddReducer(&simple_reducer); 266 graph_reducer.AddReducer(&simple_reducer);
264 graph_reducer.AddReducer(&lowering); 267 graph_reducer.AddReducer(&lowering);
265 graph_reducer.AddReducer(&mach_reducer); 268 graph_reducer.AddReducer(&mach_reducer);
266 graph_reducer.ReduceGraph(); 269 graph_reducer.ReduceGraph();
267 270
268 VerifyAndPrintGraph(&graph, "Lowered changes"); 271 VerifyAndPrintGraph(&graph, "Lowered changes");
269 } 272 }
270 } 273 }
271 274
272 Handle<Code> code = Handle<Code>::null(); 275 Handle<Code> code = Handle<Code>::null();
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 } 400 }
398 401
399 402
400 void Pipeline::TearDown() { 403 void Pipeline::TearDown() {
401 InstructionOperand::TearDownCaches(); 404 InstructionOperand::TearDownCaches();
402 } 405 }
403 406
404 } // namespace compiler 407 } // namespace compiler
405 } // namespace internal 408 } // namespace internal
406 } // namespace v8 409 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/value-numbering-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698