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

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

Issue 661923002: Implement graph trimming in ControlReducer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use Deque. Created 6 years, 2 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/control-reducer.cc ('k') | test/cctest/cctest.gyp » ('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 <sstream> 7 #include <sstream>
8 8
9 #include "src/base/platform/elapsed-timer.h" 9 #include "src/base/platform/elapsed-timer.h"
10 #include "src/compiler/ast-graph-builder.h" 10 #include "src/compiler/ast-graph-builder.h"
11 #include "src/compiler/basic-block-instrumentor.h" 11 #include "src/compiler/basic-block-instrumentor.h"
12 #include "src/compiler/change-lowering.h" 12 #include "src/compiler/change-lowering.h"
13 #include "src/compiler/code-generator.h" 13 #include "src/compiler/code-generator.h"
14 #include "src/compiler/control-reducer.h"
14 #include "src/compiler/graph-replay.h" 15 #include "src/compiler/graph-replay.h"
15 #include "src/compiler/graph-visualizer.h" 16 #include "src/compiler/graph-visualizer.h"
16 #include "src/compiler/instruction.h" 17 #include "src/compiler/instruction.h"
17 #include "src/compiler/instruction-selector.h" 18 #include "src/compiler/instruction-selector.h"
18 #include "src/compiler/js-context-specialization.h" 19 #include "src/compiler/js-context-specialization.h"
19 #include "src/compiler/js-generic-lowering.h" 20 #include "src/compiler/js-generic-lowering.h"
20 #include "src/compiler/js-inlining.h" 21 #include "src/compiler/js-inlining.h"
21 #include "src/compiler/js-typed-lowering.h" 22 #include "src/compiler/js-typed-lowering.h"
22 #include "src/compiler/machine-operator-reducer.h" 23 #include "src/compiler/machine-operator-reducer.h"
23 #include "src/compiler/phi-reducer.h" 24 #include "src/compiler/phi-reducer.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 // TODO(titzer): Figure out if we should run all reducers at once here. 345 // TODO(titzer): Figure out if we should run all reducers at once here.
345 graph_reducer.AddReducer(&vn_reducer); 346 graph_reducer.AddReducer(&vn_reducer);
346 graph_reducer.AddReducer(&simple_reducer); 347 graph_reducer.AddReducer(&simple_reducer);
347 graph_reducer.AddReducer(&lowering); 348 graph_reducer.AddReducer(&lowering);
348 graph_reducer.AddReducer(&mach_reducer); 349 graph_reducer.AddReducer(&mach_reducer);
349 graph_reducer.ReduceGraph(); 350 graph_reducer.ReduceGraph();
350 351
351 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works. 352 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works.
352 VerifyAndPrintGraph(&graph, "Lowered changes", true); 353 VerifyAndPrintGraph(&graph, "Lowered changes", true);
353 } 354 }
355
356 {
357 SourcePositionTable::Scope pos(&source_positions,
358 SourcePosition::Unknown());
359 PhaseStats control_reducer_stats(info(), PhaseStats::CREATE_GRAPH,
360 "control reduction");
361 ControlReducer::ReduceGraph(&jsgraph, &common);
362
363 VerifyAndPrintGraph(&graph, "Control reduced");
364 }
354 } 365 }
355 366
356 { 367 {
357 // Lower any remaining generic JSOperators. 368 // Lower any remaining generic JSOperators.
358 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH, 369 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
359 "generic lowering"); 370 "generic lowering");
360 SourcePositionTable::Scope pos(&source_positions, 371 SourcePositionTable::Scope pos(&source_positions,
361 SourcePosition::Unknown()); 372 SourcePosition::Unknown());
362 JSGenericLowering lowering(info(), &jsgraph); 373 JSGenericLowering lowering(info(), &jsgraph);
363 GraphReducer graph_reducer(&graph); 374 GraphReducer graph_reducer(&graph);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 } 511 }
501 512
502 513
503 void Pipeline::TearDown() { 514 void Pipeline::TearDown() {
504 InstructionOperand::TearDownCaches(); 515 InstructionOperand::TearDownCaches();
505 } 516 }
506 517
507 } // namespace compiler 518 } // namespace compiler
508 } // namespace internal 519 } // namespace internal
509 } // namespace v8 520 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/control-reducer.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698