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 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 339 |
340 | 340 |
341 static BasicBlock::RpoNumber GetRpo(BasicBlock* block) { | 341 static BasicBlock::RpoNumber GetRpo(BasicBlock* block) { |
342 if (block == NULL) return BasicBlock::RpoNumber::Invalid(); | 342 if (block == NULL) return BasicBlock::RpoNumber::Invalid(); |
343 return block->GetRpoNumber(); | 343 return block->GetRpoNumber(); |
344 } | 344 } |
345 | 345 |
346 | 346 |
347 static BasicBlock::RpoNumber GetLoopEndRpo(const BasicBlock* block) { | 347 static BasicBlock::RpoNumber GetLoopEndRpo(const BasicBlock* block) { |
348 if (!block->IsLoopHeader()) return BasicBlock::RpoNumber::Invalid(); | 348 if (!block->IsLoopHeader()) return BasicBlock::RpoNumber::Invalid(); |
349 return BasicBlock::RpoNumber::FromInt(block->loop_end()); | 349 return block->loop_end()->GetRpoNumber(); |
350 } | 350 } |
351 | 351 |
352 | 352 |
353 InstructionBlock::InstructionBlock(Zone* zone, const BasicBlock* block) | 353 InstructionBlock::InstructionBlock(Zone* zone, const BasicBlock* block) |
354 : successors_(static_cast<int>(block->SuccessorCount()), | 354 : successors_(static_cast<int>(block->SuccessorCount()), |
355 BasicBlock::RpoNumber::Invalid(), zone), | 355 BasicBlock::RpoNumber::Invalid(), zone), |
356 predecessors_(static_cast<int>(block->PredecessorCount()), | 356 predecessors_(static_cast<int>(block->PredecessorCount()), |
357 BasicBlock::RpoNumber::Invalid(), zone), | 357 BasicBlock::RpoNumber::Invalid(), zone), |
358 phis_(zone), | 358 phis_(zone), |
359 id_(block->id()), | 359 id_(block->id()), |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 os << " B" << succ_block->id(); | 660 os << " B" << succ_block->id(); |
661 } | 661 } |
662 os << "\n"; | 662 os << "\n"; |
663 } | 663 } |
664 return os; | 664 return os; |
665 } | 665 } |
666 | 666 |
667 } // namespace compiler | 667 } // namespace compiler |
668 } // namespace internal | 668 } // namespace internal |
669 } // namespace v8 | 669 } // namespace v8 |
OLD | NEW |