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

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

Issue 760403003: [turbofan] Use the temporary zone for the VN cache. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | no next file » | 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 <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/platform/elapsed-timer.h" 10 #include "src/base/platform/elapsed-timer.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 void Run(PipelineData* data, Zone* temp_zone) { data->typer()->Run(); } 384 void Run(PipelineData* data, Zone* temp_zone) { data->typer()->Run(); }
385 }; 385 };
386 386
387 387
388 struct TypedLoweringPhase { 388 struct TypedLoweringPhase {
389 static const char* phase_name() { return "typed lowering"; } 389 static const char* phase_name() { return "typed lowering"; }
390 390
391 void Run(PipelineData* data, Zone* temp_zone) { 391 void Run(PipelineData* data, Zone* temp_zone) {
392 SourcePositionTable::Scope pos(data->source_positions(), 392 SourcePositionTable::Scope pos(data->source_positions(),
393 SourcePosition::Unknown()); 393 SourcePosition::Unknown());
394 ValueNumberingReducer vn_reducer(data->graph_zone()); 394 ValueNumberingReducer vn_reducer(temp_zone);
395 JSTypedLowering lowering(data->jsgraph()); 395 JSTypedLowering lowering(data->jsgraph());
396 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); 396 SimplifiedOperatorReducer simple_reducer(data->jsgraph());
397 GraphReducer graph_reducer(data->graph(), temp_zone); 397 GraphReducer graph_reducer(data->graph(), temp_zone);
398 graph_reducer.AddReducer(&vn_reducer); 398 graph_reducer.AddReducer(&vn_reducer);
399 graph_reducer.AddReducer(&lowering); 399 graph_reducer.AddReducer(&lowering);
400 graph_reducer.AddReducer(&simple_reducer); 400 graph_reducer.AddReducer(&simple_reducer);
401 graph_reducer.ReduceGraph(); 401 graph_reducer.ReduceGraph();
402 } 402 }
403 }; 403 };
404 404
405 405
406 struct SimplifiedLoweringPhase { 406 struct SimplifiedLoweringPhase {
407 static const char* phase_name() { return "simplified lowering"; } 407 static const char* phase_name() { return "simplified lowering"; }
408 408
409 void Run(PipelineData* data, Zone* temp_zone) { 409 void Run(PipelineData* data, Zone* temp_zone) {
410 SourcePositionTable::Scope pos(data->source_positions(), 410 SourcePositionTable::Scope pos(data->source_positions(),
411 SourcePosition::Unknown()); 411 SourcePosition::Unknown());
412 SimplifiedLowering lowering(data->jsgraph()); 412 SimplifiedLowering lowering(data->jsgraph());
413 lowering.LowerAllNodes(); 413 lowering.LowerAllNodes();
414 ValueNumberingReducer vn_reducer(data->graph_zone()); 414 ValueNumberingReducer vn_reducer(temp_zone);
415 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); 415 SimplifiedOperatorReducer simple_reducer(data->jsgraph());
416 GraphReducer graph_reducer(data->graph(), temp_zone); 416 GraphReducer graph_reducer(data->graph(), temp_zone);
417 graph_reducer.AddReducer(&vn_reducer); 417 graph_reducer.AddReducer(&vn_reducer);
418 graph_reducer.AddReducer(&simple_reducer); 418 graph_reducer.AddReducer(&simple_reducer);
419 graph_reducer.ReduceGraph(); 419 graph_reducer.ReduceGraph();
420 } 420 }
421 }; 421 };
422 422
423 423
424 struct ChangeLoweringPhase { 424 struct ChangeLoweringPhase {
425 static const char* phase_name() { return "change lowering"; } 425 static const char* phase_name() { return "change lowering"; }
426 426
427 void Run(PipelineData* data, Zone* temp_zone) { 427 void Run(PipelineData* data, Zone* temp_zone) {
428 SourcePositionTable::Scope pos(data->source_positions(), 428 SourcePositionTable::Scope pos(data->source_positions(),
429 SourcePosition::Unknown()); 429 SourcePosition::Unknown());
430 Linkage linkage(data->graph_zone(), data->info()); 430 Linkage linkage(data->graph_zone(), data->info());
431 ValueNumberingReducer vn_reducer(data->graph_zone()); 431 ValueNumberingReducer vn_reducer(temp_zone);
432 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); 432 SimplifiedOperatorReducer simple_reducer(data->jsgraph());
433 ChangeLowering lowering(data->jsgraph(), &linkage); 433 ChangeLowering lowering(data->jsgraph(), &linkage);
434 MachineOperatorReducer mach_reducer(data->jsgraph()); 434 MachineOperatorReducer mach_reducer(data->jsgraph());
435 GraphReducer graph_reducer(data->graph(), temp_zone); 435 GraphReducer graph_reducer(data->graph(), temp_zone);
436 // TODO(titzer): Figure out if we should run all reducers at once here. 436 // TODO(titzer): Figure out if we should run all reducers at once here.
437 graph_reducer.AddReducer(&vn_reducer); 437 graph_reducer.AddReducer(&vn_reducer);
438 graph_reducer.AddReducer(&simple_reducer); 438 graph_reducer.AddReducer(&simple_reducer);
439 graph_reducer.AddReducer(&lowering); 439 graph_reducer.AddReducer(&lowering);
440 graph_reducer.AddReducer(&mach_reducer); 440 graph_reducer.AddReducer(&mach_reducer);
441 graph_reducer.ReduceGraph(); 441 graph_reducer.ReduceGraph();
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 } 1028 }
1029 1029
1030 1030
1031 void Pipeline::TearDown() { 1031 void Pipeline::TearDown() {
1032 InstructionOperand::TearDownCaches(); 1032 InstructionOperand::TearDownCaches();
1033 } 1033 }
1034 1034
1035 } // namespace compiler 1035 } // namespace compiler
1036 } // namespace internal 1036 } // namespace internal
1037 } // namespace v8 1037 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698