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/bit-vector.h" | 5 #include "src/bit-vector.h" |
6 #include "src/compiler/instruction.h" | 6 #include "src/compiler/instruction.h" |
7 #include "src/compiler/register-allocator-verifier.h" | 7 #include "src/compiler/register-allocator-verifier.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 | 366 |
367 void RegisterAllocatorVerifier::ValidatePendingAssessment( | 367 void RegisterAllocatorVerifier::ValidatePendingAssessment( |
368 RpoNumber block_id, InstructionOperand op, | 368 RpoNumber block_id, InstructionOperand op, |
369 BlockAssessments* current_assessments, const PendingAssessment* assessment, | 369 BlockAssessments* current_assessments, const PendingAssessment* assessment, |
370 int virtual_register) { | 370 int virtual_register) { |
371 // When validating a pending assessment, it is possible some of the | 371 // When validating a pending assessment, it is possible some of the |
372 // assessments | 372 // assessments |
373 // for the original operand (the one where the assessment was created for | 373 // for the original operand (the one where the assessment was created for |
374 // first) are also pending. To avoid recursion, we use a work list. To | 374 // first) are also pending. To avoid recursion, we use a work list. To |
375 // deal with cycles, we keep a set of seen nodes. | 375 // deal with cycles, we keep a set of seen nodes. |
376 ZoneQueue<std::pair<const PendingAssessment*, int>> worklist(zone()); | 376 Zone local_zone(zone()->allocator(), ZONE_NAME); |
377 ZoneSet<RpoNumber> seen(zone()); | 377 ZoneQueue<std::pair<const PendingAssessment*, int>> worklist(&local_zone); |
| 378 ZoneSet<RpoNumber> seen(&local_zone); |
378 worklist.push(std::make_pair(assessment, virtual_register)); | 379 worklist.push(std::make_pair(assessment, virtual_register)); |
379 seen.insert(block_id); | 380 seen.insert(block_id); |
380 | 381 |
381 while (!worklist.empty()) { | 382 while (!worklist.empty()) { |
382 auto work = worklist.front(); | 383 auto work = worklist.front(); |
383 const PendingAssessment* current_assessment = work.first; | 384 const PendingAssessment* current_assessment = work.first; |
384 int current_virtual_register = work.second; | 385 int current_virtual_register = work.second; |
385 InstructionOperand current_operand = current_assessment->operand(); | 386 InstructionOperand current_operand = current_assessment->operand(); |
386 worklist.pop(); | 387 worklist.pop(); |
387 | 388 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 new (zone()) FinalAssessment(vreg, pending); | 576 new (zone()) FinalAssessment(vreg, pending); |
576 break; | 577 break; |
577 } | 578 } |
578 } | 579 } |
579 } | 580 } |
580 } | 581 } |
581 | 582 |
582 } // namespace compiler | 583 } // namespace compiler |
583 } // namespace internal | 584 } // namespace internal |
584 } // namespace v8 | 585 } // namespace v8 |
OLD | NEW |