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

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

Issue 516853002: Preliminary lowering of typed array loads in TF. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixups after rebase. 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/js-typed-lowering.cc ('k') | src/compiler/simplified-operator.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/phi-reducer.h" 20 #include "src/compiler/phi-reducer.h"
20 #include "src/compiler/register-allocator.h" 21 #include "src/compiler/register-allocator.h"
21 #include "src/compiler/schedule.h" 22 #include "src/compiler/schedule.h"
22 #include "src/compiler/scheduler.h" 23 #include "src/compiler/scheduler.h"
23 #include "src/compiler/simplified-lowering.h" 24 #include "src/compiler/simplified-lowering.h"
25 #include "src/compiler/simplified-operator-reducer.h"
24 #include "src/compiler/typer.h" 26 #include "src/compiler/typer.h"
25 #include "src/compiler/verifier.h" 27 #include "src/compiler/verifier.h"
26 #include "src/hydrogen.h" 28 #include "src/hydrogen.h"
27 #include "src/ostreams.h" 29 #include "src/ostreams.h"
28 #include "src/utils.h" 30 #include "src/utils.h"
29 31
30 namespace v8 { 32 namespace v8 {
31 namespace internal { 33 namespace internal {
32 namespace compiler { 34 namespace compiler {
33 35
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 JSInliner inliner(info(), &jsgraph); 208 JSInliner inliner(info(), &jsgraph);
207 inliner.Inline(); 209 inliner.Inline();
208 VerifyAndPrintGraph(&graph, "Inlined"); 210 VerifyAndPrintGraph(&graph, "Inlined");
209 } 211 }
210 212
211 // Print a replay of the initial graph. 213 // Print a replay of the initial graph.
212 if (FLAG_print_turbo_replay) { 214 if (FLAG_print_turbo_replay) {
213 GraphReplayPrinter::PrintReplay(&graph); 215 GraphReplayPrinter::PrintReplay(&graph);
214 } 216 }
215 217
216 if (FLAG_turbo_types) { 218 if (info()->is_typing_enabled()) {
217 { 219 {
218 // Type the graph. 220 // Type the graph.
219 PhaseStats typer_stats(info(), PhaseStats::CREATE_GRAPH, "typer"); 221 PhaseStats typer_stats(info(), PhaseStats::CREATE_GRAPH, "typer");
220 typer.Run(&graph, info()->context()); 222 typer.Run(&graph, info()->context());
221 } 223 }
222 // All new nodes must be typed. 224 // All new nodes must be typed.
223 typer.DecorateGraph(&graph); 225 typer.DecorateGraph(&graph);
224 { 226 {
225 // Lower JSOperators where we can determine types. 227 // Lower JSOperators where we can determine types.
226 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH, 228 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
(...skipping 13 matching lines...) Expand all
240 "simplified lowering"); 242 "simplified lowering");
241 SourcePositionTable::Scope pos(&source_positions, 243 SourcePositionTable::Scope pos(&source_positions,
242 SourcePosition::Unknown()); 244 SourcePosition::Unknown());
243 SimplifiedLowering lowering(&jsgraph); 245 SimplifiedLowering lowering(&jsgraph);
244 lowering.LowerAllNodes(); 246 lowering.LowerAllNodes();
245 247
246 VerifyAndPrintGraph(&graph, "Lowered simplified"); 248 VerifyAndPrintGraph(&graph, "Lowered simplified");
247 } 249 }
248 { 250 {
249 // Lower changes that have been inserted before. 251 // Lower changes that have been inserted before.
250 PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH, 252 PhaseStats lowering_stats(info(), PhaseStats::OPTIMIZATION,
251 "change lowering"); 253 "change lowering");
252 SourcePositionTable::Scope pos(&source_positions, 254 SourcePositionTable::Scope pos(&source_positions,
253 SourcePosition::Unknown()); 255 SourcePosition::Unknown());
254 Linkage linkage(info()); 256 Linkage linkage(info());
255 MachineOperatorBuilder machine(zone()); 257 MachineOperatorBuilder machine(zone());
258 SimplifiedOperatorReducer simple_reducer(&jsgraph, &machine);
256 ChangeLowering lowering(&jsgraph, &linkage, &machine); 259 ChangeLowering lowering(&jsgraph, &linkage, &machine);
260 MachineOperatorReducer mach_reducer(&graph);
257 GraphReducer graph_reducer(&graph); 261 GraphReducer graph_reducer(&graph);
262 // TODO(titzer): Figure out if we should run all reducers at once here.
263 graph_reducer.AddReducer(&simple_reducer);
258 graph_reducer.AddReducer(&lowering); 264 graph_reducer.AddReducer(&lowering);
265 graph_reducer.AddReducer(&mach_reducer);
259 graph_reducer.ReduceGraph(); 266 graph_reducer.ReduceGraph();
260 267
261 VerifyAndPrintGraph(&graph, "Lowered changes"); 268 VerifyAndPrintGraph(&graph, "Lowered changes");
262 } 269 }
263 } 270 }
264 271
265 Handle<Code> code = Handle<Code>::null(); 272 Handle<Code> code = Handle<Code>::null();
266 if (SupportedTarget()) { 273 if (SupportedTarget()) {
267 { 274 {
268 // Lower any remaining generic JSOperators. 275 // Lower any remaining generic JSOperators.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 } 397 }
391 398
392 399
393 void Pipeline::TearDown() { 400 void Pipeline::TearDown() {
394 InstructionOperand::TearDownCaches(); 401 InstructionOperand::TearDownCaches();
395 } 402 }
396 403
397 } // namespace compiler 404 } // namespace compiler
398 } // namespace internal 405 } // namespace internal
399 } // namespace v8 406 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698