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

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: Test status for mjsunit/asm/infinite-loops.asm. 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
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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 // TODO(titzer): Figure out if we should run all reducers at once here. 341 // TODO(titzer): Figure out if we should run all reducers at once here.
341 graph_reducer.AddReducer(&vn_reducer); 342 graph_reducer.AddReducer(&vn_reducer);
342 graph_reducer.AddReducer(&simple_reducer); 343 graph_reducer.AddReducer(&simple_reducer);
343 graph_reducer.AddReducer(&lowering); 344 graph_reducer.AddReducer(&lowering);
344 graph_reducer.AddReducer(&mach_reducer); 345 graph_reducer.AddReducer(&mach_reducer);
345 graph_reducer.ReduceGraph(); 346 graph_reducer.ReduceGraph();
346 347
347 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works. 348 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works.
348 VerifyAndPrintGraph(&graph, "Lowered changes", true); 349 VerifyAndPrintGraph(&graph, "Lowered changes", true);
349 } 350 }
351
352 {
353 SourcePositionTable::Scope pos(&source_positions,
354 SourcePosition::Unknown());
355 PhaseStats control_reducer_stats(info(), PhaseStats::CREATE_GRAPH,
356 "control reduction");
357 ControlReducer::ReduceGraph(&jsgraph, &common);
358
359 VerifyAndPrintGraph(&graph, "Control reduced");
360 }
350 } 361 }
351 362
352 { 363 {
353 // Lower any remaining generic JSOperators. 364 // Lower any remaining generic JSOperators.
354 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH, 365 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
355 "generic lowering"); 366 "generic lowering");
356 SourcePositionTable::Scope pos(&source_positions, 367 SourcePositionTable::Scope pos(&source_positions,
357 SourcePosition::Unknown()); 368 SourcePosition::Unknown());
358 JSGenericLowering lowering(info(), &jsgraph); 369 JSGenericLowering lowering(info(), &jsgraph);
359 GraphReducer graph_reducer(&graph); 370 GraphReducer graph_reducer(&graph);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 } 507 }
497 508
498 509
499 void Pipeline::TearDown() { 510 void Pipeline::TearDown() {
500 InstructionOperand::TearDownCaches(); 511 InstructionOperand::TearDownCaches();
501 } 512 }
502 513
503 } // namespace compiler 514 } // namespace compiler
504 } // namespace internal 515 } // namespace internal
505 } // namespace v8 516 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698