Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/compiler/register-allocator-verifier.cc

Issue 2519973004: [turbofan] Regalloc validator: support same block pending assessment (Closed)
Patch Set: fix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/wasm/regression-667745.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 if (assessment->virtual_register() == virtual_register) return; 463 if (assessment->virtual_register() == virtual_register) return;
464 // If we have 2 phis with the exact same operand list, and the first phi is 464 // If we have 2 phis with the exact same operand list, and the first phi is
465 // used before the second one, via the operand incoming to the block, 465 // used before the second one, via the operand incoming to the block,
466 // and the second one's operand is defined (via a parallel move) after the 466 // and the second one's operand is defined (via a parallel move) after the
467 // use, then the original operand will be assigned to the first phi. We 467 // use, then the original operand will be assigned to the first phi. We
468 // then look at the original pending assessment to ascertain if op 468 // then look at the original pending assessment to ascertain if op
469 // is virtual_register. 469 // is virtual_register.
470 const PendingAssessment* old = assessment->original_pending_assessment(); 470 const PendingAssessment* old = assessment->original_pending_assessment();
471 CHECK_NOT_NULL(old); 471 CHECK_NOT_NULL(old);
472 RpoNumber old_block = old->origin()->rpo_number(); 472 RpoNumber old_block = old->origin()->rpo_number();
473 BlockAssessments* old_block_assessments = assessments_[old_block]; 473 DCHECK_LE(old_block, block_id);
474 BlockAssessments* old_block_assessments =
475 old_block == block_id ? current_assessments : assessments_[old_block];
474 ValidatePendingAssessment(old_block, op, old_block_assessments, old, 476 ValidatePendingAssessment(old_block, op, old_block_assessments, old,
475 virtual_register); 477 virtual_register);
476 } 478 }
477 479
478 void RegisterAllocatorVerifier::ValidateUse( 480 void RegisterAllocatorVerifier::ValidateUse(
479 RpoNumber block_id, BlockAssessments* current_assessments, 481 RpoNumber block_id, BlockAssessments* current_assessments,
480 InstructionOperand op, int virtual_register) { 482 InstructionOperand op, int virtual_register) {
481 auto iterator = current_assessments->map().find(op); 483 auto iterator = current_assessments->map().find(op);
482 // We should have seen this operand before. 484 // We should have seen this operand before.
483 CHECK(iterator != current_assessments->map().end()); 485 CHECK(iterator != current_assessments->map().end());
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 new (zone()) FinalAssessment(vreg, pending); 575 new (zone()) FinalAssessment(vreg, pending);
574 break; 576 break;
575 } 577 }
576 } 578 }
577 } 579 }
578 } 580 }
579 581
580 } // namespace compiler 582 } // namespace compiler
581 } // namespace internal 583 } // namespace internal
582 } // namespace v8 584 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/wasm/regression-667745.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698