| OLD | NEW |
| 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 DCHECK_NOT_NULL(data->graph()); | 531 DCHECK_NOT_NULL(data->graph()); |
| 532 DCHECK_NOT_NULL(data->schedule()); | 532 DCHECK_NOT_NULL(data->schedule()); |
| 533 CHECK(SupportedBackend()); | 533 CHECK(SupportedBackend()); |
| 534 | 534 |
| 535 BasicBlockProfiler::Data* profiler_data = NULL; | 535 BasicBlockProfiler::Data* profiler_data = NULL; |
| 536 if (FLAG_turbo_profiling) { | 536 if (FLAG_turbo_profiling) { |
| 537 profiler_data = BasicBlockInstrumentor::Instrument(info(), data->graph(), | 537 profiler_data = BasicBlockInstrumentor::Instrument(info(), data->graph(), |
| 538 data->schedule()); | 538 data->schedule()); |
| 539 } | 539 } |
| 540 | 540 |
| 541 InstructionSequence sequence(data->instruction_zone(), data->graph(), | 541 InstructionSequence sequence(data->instruction_zone(), data->schedule()); |
| 542 data->schedule()); | |
| 543 | 542 |
| 544 // Select and schedule instructions covering the scheduled graph. | 543 // Select and schedule instructions covering the scheduled graph. |
| 545 { | 544 { |
| 546 PhaseScope phase_scope(data->pipeline_statistics(), "select instructions"); | 545 PhaseScope phase_scope(data->pipeline_statistics(), "select instructions"); |
| 547 ZonePool::Scope zone_scope(data->zone_pool()); | 546 ZonePool::Scope zone_scope(data->zone_pool()); |
| 548 InstructionSelector selector(zone_scope.zone(), linkage, &sequence, | 547 InstructionSelector selector(zone_scope.zone(), data->graph(), linkage, |
| 549 data->schedule(), data->source_positions()); | 548 &sequence, data->schedule(), |
| 549 data->source_positions()); |
| 550 selector.SelectInstructions(); | 550 selector.SelectInstructions(); |
| 551 } | 551 } |
| 552 | 552 |
| 553 if (FLAG_trace_turbo) { | 553 if (FLAG_trace_turbo) { |
| 554 OFStream os(stdout); | 554 OFStream os(stdout); |
| 555 os << "----- Instruction sequence before register allocation -----\n" | 555 os << "----- Instruction sequence before register allocation -----\n" |
| 556 << sequence; | 556 << sequence; |
| 557 TurboCfgFile tcf(isolate()); | 557 TurboCfgFile tcf(isolate()); |
| 558 tcf << AsC1V("CodeGen", data->schedule(), data->source_positions(), | 558 tcf << AsC1V("CodeGen", data->schedule(), data->source_positions(), |
| 559 &sequence); | 559 &sequence); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 } | 627 } |
| 628 | 628 |
| 629 | 629 |
| 630 void Pipeline::TearDown() { | 630 void Pipeline::TearDown() { |
| 631 InstructionOperand::TearDownCaches(); | 631 InstructionOperand::TearDownCaches(); |
| 632 } | 632 } |
| 633 | 633 |
| 634 } // namespace compiler | 634 } // namespace compiler |
| 635 } // namespace internal | 635 } // namespace internal |
| 636 } // namespace v8 | 636 } // namespace v8 |
| OLD | NEW |