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/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 #include "src/compiler/generic-node-inl.h" | 6 #include "src/compiler/generic-node-inl.h" |
7 #include "src/compiler/graph.h" | 7 #include "src/compiler/graph.h" |
8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
10 | 10 |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 322 |
323 | 323 |
324 static BasicBlock::RpoNumber GetRpo(BasicBlock* block) { | 324 static BasicBlock::RpoNumber GetRpo(BasicBlock* block) { |
325 if (block == NULL) return BasicBlock::RpoNumber::Invalid(); | 325 if (block == NULL) return BasicBlock::RpoNumber::Invalid(); |
326 return block->GetRpoNumber(); | 326 return block->GetRpoNumber(); |
327 } | 327 } |
328 | 328 |
329 | 329 |
330 static BasicBlock::RpoNumber GetLoopEndRpo(const BasicBlock* block) { | 330 static BasicBlock::RpoNumber GetLoopEndRpo(const BasicBlock* block) { |
331 if (!block->IsLoopHeader()) return BasicBlock::RpoNumber::Invalid(); | 331 if (!block->IsLoopHeader()) return BasicBlock::RpoNumber::Invalid(); |
332 return BasicBlock::RpoNumber::FromInt(block->loop_end()); | 332 return block->loop_end()->GetRpoNumber(); |
333 } | 333 } |
334 | 334 |
335 | 335 |
336 InstructionBlock::InstructionBlock(Zone* zone, const BasicBlock* block) | 336 InstructionBlock::InstructionBlock(Zone* zone, const BasicBlock* block) |
337 : successors_(static_cast<int>(block->SuccessorCount()), | 337 : successors_(static_cast<int>(block->SuccessorCount()), |
338 BasicBlock::RpoNumber::Invalid(), zone), | 338 BasicBlock::RpoNumber::Invalid(), zone), |
339 predecessors_(static_cast<int>(block->PredecessorCount()), | 339 predecessors_(static_cast<int>(block->PredecessorCount()), |
340 BasicBlock::RpoNumber::Invalid(), zone), | 340 BasicBlock::RpoNumber::Invalid(), zone), |
341 phis_(zone), | 341 phis_(zone), |
342 id_(block->id()), | 342 id_(block->id()), |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 os << " B" << succ_block->id(); | 645 os << " B" << succ_block->id(); |
646 } | 646 } |
647 os << "\n"; | 647 os << "\n"; |
648 } | 648 } |
649 return os; | 649 return os; |
650 } | 650 } |
651 | 651 |
652 } // namespace compiler | 652 } // namespace compiler |
653 } // namespace internal | 653 } // namespace internal |
654 } // namespace v8 | 654 } // namespace v8 |
OLD | NEW |