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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 return Emit(instr); | 166 return Emit(instr); |
167 } | 167 } |
168 | 168 |
169 | 169 |
170 Instruction* InstructionSelector::Emit(Instruction* instr) { | 170 Instruction* InstructionSelector::Emit(Instruction* instr) { |
171 instructions_.push_back(instr); | 171 instructions_.push_back(instr); |
172 return instr; | 172 return instr; |
173 } | 173 } |
174 | 174 |
175 | 175 |
176 bool InstructionSelector::IsNextInAssemblyOrder(const BasicBlock* block) const { | |
177 return current_block_->GetAoNumber().IsNext(block->GetAoNumber()); | |
178 } | |
179 | |
180 | |
181 bool InstructionSelector::CanCover(Node* user, Node* node) const { | 176 bool InstructionSelector::CanCover(Node* user, Node* node) const { |
182 return node->OwnedBy(user) && | 177 return node->OwnedBy(user) && |
183 schedule()->block(node) == schedule()->block(user); | 178 schedule()->block(node) == schedule()->block(user); |
184 } | 179 } |
185 | 180 |
186 | 181 |
187 int InstructionSelector::GetVirtualRegister(const Node* node) { | 182 int InstructionSelector::GetVirtualRegister(const Node* node) { |
188 if (node_map_[node->id()] == kNodeUnmapped) { | 183 if (node_map_[node->id()] == kNodeUnmapped) { |
189 node_map_[node->id()] = sequence()->NextVirtualRegister(); | 184 node_map_[node->id()] = sequence()->NextVirtualRegister(); |
190 } | 185 } |
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1142 MachineOperatorBuilder::Flags | 1137 MachineOperatorBuilder::Flags |
1143 InstructionSelector::SupportedMachineOperatorFlags() { | 1138 InstructionSelector::SupportedMachineOperatorFlags() { |
1144 return MachineOperatorBuilder::Flag::kNoFlags; | 1139 return MachineOperatorBuilder::Flag::kNoFlags; |
1145 } | 1140 } |
1146 | 1141 |
1147 #endif // !V8_TURBOFAN_BACKEND | 1142 #endif // !V8_TURBOFAN_BACKEND |
1148 | 1143 |
1149 } // namespace compiler | 1144 } // namespace compiler |
1150 } // namespace internal | 1145 } // namespace internal |
1151 } // namespace v8 | 1146 } // namespace v8 |
OLD | NEW |