| 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/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
| 10 #include "src/compiler/instruction-selector-impl.h" | 10 #include "src/compiler/instruction-selector-impl.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 sequence()->InstructionBlockAt(RpoNumber::FromInt(block->rpo_number())); | 75 sequence()->InstructionBlockAt(RpoNumber::FromInt(block->rpo_number())); |
| 76 size_t end = instruction_block->code_end(); | 76 size_t end = instruction_block->code_end(); |
| 77 size_t start = instruction_block->code_start(); | 77 size_t start = instruction_block->code_start(); |
| 78 DCHECK_LE(end, start); | 78 DCHECK_LE(end, start); |
| 79 StartBlock(RpoNumber::FromInt(block->rpo_number())); | 79 StartBlock(RpoNumber::FromInt(block->rpo_number())); |
| 80 while (start-- > end) { | 80 while (start-- > end) { |
| 81 AddInstruction(instructions_[start]); | 81 AddInstruction(instructions_[start]); |
| 82 } | 82 } |
| 83 EndBlock(RpoNumber::FromInt(block->rpo_number())); | 83 EndBlock(RpoNumber::FromInt(block->rpo_number())); |
| 84 } | 84 } |
| 85 #if DEBUG |
| 86 sequence()->ValidateSSA(); |
| 87 #endif |
| 85 } | 88 } |
| 86 | 89 |
| 87 | 90 |
| 88 void InstructionSelector::StartBlock(RpoNumber rpo) { | 91 void InstructionSelector::StartBlock(RpoNumber rpo) { |
| 89 if (FLAG_turbo_instruction_scheduling && | 92 if (FLAG_turbo_instruction_scheduling && |
| 90 InstructionScheduler::SchedulerSupported()) { | 93 InstructionScheduler::SchedulerSupported()) { |
| 91 DCHECK_NOT_NULL(scheduler_); | 94 DCHECK_NOT_NULL(scheduler_); |
| 92 scheduler_->StartBlock(rpo); | 95 scheduler_->StartBlock(rpo); |
| 93 } else { | 96 } else { |
| 94 sequence()->StartBlock(rpo); | 97 sequence()->StartBlock(rpo); |
| (...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1725 return new (instruction_zone()) FrameStateDescriptor( | 1728 return new (instruction_zone()) FrameStateDescriptor( |
| 1726 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1729 instruction_zone(), state_info.type(), state_info.bailout_id(), |
| 1727 state_info.state_combine(), parameters, locals, stack, | 1730 state_info.state_combine(), parameters, locals, stack, |
| 1728 state_info.shared_info(), outer_state); | 1731 state_info.shared_info(), outer_state); |
| 1729 } | 1732 } |
| 1730 | 1733 |
| 1731 | 1734 |
| 1732 } // namespace compiler | 1735 } // namespace compiler |
| 1733 } // namespace internal | 1736 } // namespace internal |
| 1734 } // namespace v8 | 1737 } // namespace v8 |
| OLD | NEW |