Chromium Code Reviews| 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/adapters.h" | 10 #include "src/base/adapters.h" |
| (...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1477 Run<AllocateDoubleRegistersPhase<GreedyAllocator>>(); | 1477 Run<AllocateDoubleRegistersPhase<GreedyAllocator>>(); |
| 1478 } else { | 1478 } else { |
| 1479 Run<AllocateGeneralRegistersPhase<LinearScanAllocator>>(); | 1479 Run<AllocateGeneralRegistersPhase<LinearScanAllocator>>(); |
| 1480 Run<AllocateDoubleRegistersPhase<LinearScanAllocator>>(); | 1480 Run<AllocateDoubleRegistersPhase<LinearScanAllocator>>(); |
| 1481 } | 1481 } |
| 1482 | 1482 |
| 1483 if (FLAG_turbo_preprocess_ranges) { | 1483 if (FLAG_turbo_preprocess_ranges) { |
| 1484 Run<MergeSplintersPhase>(); | 1484 Run<MergeSplintersPhase>(); |
| 1485 } | 1485 } |
| 1486 | 1486 |
| 1487 // We plan to enable frame elision only for stubs and bytecode handlers. | |
| 1488 if (FLAG_turbo_frame_elision && info()->IsStub()) { | |
| 1489 Run<LocateSpillSlotsPhase>(); | |
| 1490 Run<FrameElisionPhase>(); | |
| 1491 } | |
| 1492 | |
| 1493 Run<AssignSpillSlotsPhase>(); | 1487 Run<AssignSpillSlotsPhase>(); |
| 1494 | 1488 |
| 1495 Run<CommitAssignmentPhase>(); | 1489 Run<CommitAssignmentPhase>(); |
| 1496 Run<PopulateReferenceMapsPhase>(); | 1490 Run<PopulateReferenceMapsPhase>(); |
| 1497 Run<ConnectRangesPhase>(); | 1491 Run<ConnectRangesPhase>(); |
| 1498 Run<ResolveControlFlowPhase>(); | 1492 Run<ResolveControlFlowPhase>(); |
| 1499 if (FLAG_turbo_move_optimization) { | 1493 if (FLAG_turbo_move_optimization) { |
| 1500 Run<OptimizeMovesPhase>(); | 1494 Run<OptimizeMovesPhase>(); |
| 1501 } | 1495 } |
| 1502 | 1496 |
| 1497 if (descriptor && descriptor->RequiresFrameAsIncoming()) { | |
| 1498 data_->sequence()->instruction_blocks()[0]->mark_needs_frame(); | |
|
danno
2016/03/22 09:27:20
I think this extra marking makes more sense in Ini
Mircea Trofin
2016/03/22 17:28:23
Done.
| |
| 1499 } | |
| 1500 Run<LocateSpillSlotsPhase>(); | |
| 1501 Run<FrameElisionPhase>(); | |
| 1502 | |
| 1503 if (FLAG_trace_turbo_graph) { | 1503 if (FLAG_trace_turbo_graph) { |
| 1504 OFStream os(stdout); | 1504 OFStream os(stdout); |
| 1505 PrintableInstructionSequence printable = {config, data->sequence()}; | 1505 PrintableInstructionSequence printable = {config, data->sequence()}; |
| 1506 os << "----- Instruction sequence after register allocation -----\n" | 1506 os << "----- Instruction sequence after register allocation -----\n" |
| 1507 << printable; | 1507 << printable; |
| 1508 } | 1508 } |
| 1509 | 1509 |
| 1510 if (verifier != nullptr) { | 1510 if (verifier != nullptr) { |
| 1511 verifier->VerifyAssignment(); | 1511 verifier->VerifyAssignment(); |
| 1512 verifier->VerifyGapMoves(); | 1512 verifier->VerifyGapMoves(); |
| 1513 } | 1513 } |
| 1514 | 1514 |
| 1515 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { | 1515 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { |
| 1516 TurboCfgFile tcf(data->isolate()); | 1516 TurboCfgFile tcf(data->isolate()); |
| 1517 tcf << AsC1VRegisterAllocationData("CodeGen", | 1517 tcf << AsC1VRegisterAllocationData("CodeGen", |
| 1518 data->register_allocation_data()); | 1518 data->register_allocation_data()); |
| 1519 } | 1519 } |
| 1520 | 1520 |
| 1521 data->DeleteRegisterAllocationZone(); | 1521 data->DeleteRegisterAllocationZone(); |
| 1522 } | 1522 } |
| 1523 | 1523 |
| 1524 Isolate* Pipeline::isolate() const { return info()->isolate(); } | 1524 Isolate* Pipeline::isolate() const { return info()->isolate(); } |
| 1525 | 1525 |
| 1526 } // namespace compiler | 1526 } // namespace compiler |
| 1527 } // namespace internal | 1527 } // namespace internal |
| 1528 } // namespace v8 | 1528 } // namespace v8 |
| OLD | NEW |