| 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 "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
| 8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 VisitBlock(*i); | 59 VisitBlock(*i); |
| 60 } | 60 } |
| 61 | 61 |
| 62 // Schedule the selected instructions. | 62 // Schedule the selected instructions. |
| 63 for (BasicBlockVectorIter i = blocks->begin(); i != blocks->end(); ++i) { | 63 for (BasicBlockVectorIter i = blocks->begin(); i != blocks->end(); ++i) { |
| 64 BasicBlock* block = *i; | 64 BasicBlock* block = *i; |
| 65 InstructionBlock* instruction_block = | 65 InstructionBlock* instruction_block = |
| 66 sequence()->InstructionBlockAt(block->GetRpoNumber()); | 66 sequence()->InstructionBlockAt(block->GetRpoNumber()); |
| 67 size_t end = instruction_block->code_end(); | 67 size_t end = instruction_block->code_end(); |
| 68 size_t start = instruction_block->code_start(); | 68 size_t start = instruction_block->code_start(); |
| 69 sequence()->StartBlock(block); | 69 sequence()->StartBlock(block->GetRpoNumber()); |
| 70 while (start-- > end) { | 70 while (start-- > end) { |
| 71 sequence()->AddInstruction(instructions_[start]); | 71 sequence()->AddInstruction(instructions_[start]); |
| 72 } | 72 } |
| 73 sequence()->EndBlock(block); | 73 sequence()->EndBlock(block->GetRpoNumber()); |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 | 77 |
| 78 Instruction* InstructionSelector::Emit(InstructionCode opcode, | 78 Instruction* InstructionSelector::Emit(InstructionCode opcode, |
| 79 InstructionOperand* output, | 79 InstructionOperand* output, |
| 80 size_t temp_count, | 80 size_t temp_count, |
| 81 InstructionOperand** temps) { | 81 InstructionOperand** temps) { |
| 82 size_t output_count = output == NULL ? 0 : 1; | 82 size_t output_count = output == NULL ? 0 : 1; |
| 83 return Emit(opcode, output_count, &output, 0, NULL, temp_count, temps); | 83 return Emit(opcode, output_count, &output, 0, NULL, temp_count, temps); |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 MachineOperatorBuilder::Flags | 1114 MachineOperatorBuilder::Flags |
| 1115 InstructionSelector::SupportedMachineOperatorFlags() { | 1115 InstructionSelector::SupportedMachineOperatorFlags() { |
| 1116 return MachineOperatorBuilder::Flag::kNoFlags; | 1116 return MachineOperatorBuilder::Flag::kNoFlags; |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 #endif // !V8_TURBOFAN_BACKEND | 1119 #endif // !V8_TURBOFAN_BACKEND |
| 1120 | 1120 |
| 1121 } // namespace compiler | 1121 } // namespace compiler |
| 1122 } // namespace internal | 1122 } // namespace internal |
| 1123 } // namespace v8 | 1123 } // namespace v8 |
| OLD | NEW |