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

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

Issue 453833003: Add initial support for inlining. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add initial support for inlining. Created 6 years, 4 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/node-properties-inl.h ('k') | src/flag-definitions.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/code-generator.h" 9 #include "src/compiler/code-generator.h"
10 #include "src/compiler/graph-replay.h" 10 #include "src/compiler/graph-replay.h"
11 #include "src/compiler/graph-visualizer.h" 11 #include "src/compiler/graph-visualizer.h"
12 #include "src/compiler/instruction.h" 12 #include "src/compiler/instruction.h"
13 #include "src/compiler/instruction-selector.h" 13 #include "src/compiler/instruction-selector.h"
14 #include "src/compiler/js-context-specialization.h" 14 #include "src/compiler/js-context-specialization.h"
15 #include "src/compiler/js-generic-lowering.h" 15 #include "src/compiler/js-generic-lowering.h"
16 #include "src/compiler/js-inlining.h"
16 #include "src/compiler/js-typed-lowering.h" 17 #include "src/compiler/js-typed-lowering.h"
17 #include "src/compiler/phi-reducer.h" 18 #include "src/compiler/phi-reducer.h"
18 #include "src/compiler/register-allocator.h" 19 #include "src/compiler/register-allocator.h"
19 #include "src/compiler/schedule.h" 20 #include "src/compiler/schedule.h"
20 #include "src/compiler/scheduler.h" 21 #include "src/compiler/scheduler.h"
21 #include "src/compiler/simplified-lowering.h" 22 #include "src/compiler/simplified-lowering.h"
22 #include "src/compiler/typer.h" 23 #include "src/compiler/typer.h"
23 #include "src/compiler/verifier.h" 24 #include "src/compiler/verifier.h"
24 #include "src/hydrogen.h" 25 #include "src/hydrogen.h"
25 #include "src/ostreams.h" 26 #include "src/ostreams.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 graph_reducer.AddReducer(&phi_reducer); 180 graph_reducer.AddReducer(&phi_reducer);
180 graph_reducer.ReduceGraph(); 181 graph_reducer.ReduceGraph();
181 // TODO(mstarzinger): Running reducer once ought to be enough for everyone. 182 // TODO(mstarzinger): Running reducer once ought to be enough for everyone.
182 graph_reducer.ReduceGraph(); 183 graph_reducer.ReduceGraph();
183 graph_reducer.ReduceGraph(); 184 graph_reducer.ReduceGraph();
184 } 185 }
185 186
186 VerifyAndPrintGraph(&graph, "Initial untyped"); 187 VerifyAndPrintGraph(&graph, "Initial untyped");
187 188
188 if (FLAG_context_specialization) { 189 if (FLAG_context_specialization) {
189 SourcePositionTable::Scope pos_(&source_positions, 190 SourcePositionTable::Scope pos(&source_positions,
190 SourcePosition::Unknown()); 191 SourcePosition::Unknown());
191 // Specialize the code to the context as aggressively as possible. 192 // Specialize the code to the context as aggressively as possible.
192 JSContextSpecializer spec(info(), &jsgraph, context_node); 193 JSContextSpecializer spec(info(), &jsgraph, context_node);
193 spec.SpecializeToContext(); 194 spec.SpecializeToContext();
194 VerifyAndPrintGraph(&graph, "Context specialized"); 195 VerifyAndPrintGraph(&graph, "Context specialized");
195 } 196 }
196 197
198 if (FLAG_turbo_inlining) {
199 SourcePositionTable::Scope pos(&source_positions,
200 SourcePosition::Unknown());
201 JSInliner inliner(info(), &jsgraph);
202 inliner.Inline();
203 VerifyAndPrintGraph(&graph, "Inlined");
204 }
205
197 // Print a replay of the initial graph. 206 // Print a replay of the initial graph.
198 if (FLAG_print_turbo_replay) { 207 if (FLAG_print_turbo_replay) {
199 GraphReplayPrinter::PrintReplay(&graph); 208 GraphReplayPrinter::PrintReplay(&graph);
200 } 209 }
201 210
202 if (FLAG_turbo_types) { 211 if (FLAG_turbo_types) {
203 { 212 {
204 // Type the graph. 213 // Type the graph.
205 PhaseStats typer_stats(info(), PhaseStats::CREATE_GRAPH, "typer"); 214 PhaseStats typer_stats(info(), PhaseStats::CREATE_GRAPH, "typer");
206 typer.Run(&graph, info()->context()); 215 typer.Run(&graph, info()->context());
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 } 358 }
350 359
351 360
352 void Pipeline::TearDown() { 361 void Pipeline::TearDown() {
353 InstructionOperand::TearDownCaches(); 362 InstructionOperand::TearDownCaches();
354 } 363 }
355 364
356 } // namespace compiler 365 } // namespace compiler
357 } // namespace internal 366 } // namespace internal
358 } // namespace v8 367 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/node-properties-inl.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698