Chromium Code Reviews| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 275 if (moves == nullptr) return; | 275 if (moves == nullptr) return; |
| 276 | 276 |
| 277 CHECK(map_for_moves_.empty()); | 277 CHECK(map_for_moves_.empty()); |
| 278 for (MoveOperands* move : *moves) { | 278 for (MoveOperands* move : *moves) { |
| 279 if (move->IsEliminated() || move->IsRedundant()) continue; | 279 if (move->IsEliminated() || move->IsRedundant()) continue; |
| 280 auto it = map_.find(move->source()); | 280 auto it = map_.find(move->source()); |
| 281 // The RHS of a parallel move should have been already assessed. | 281 // The RHS of a parallel move should have been already assessed. |
| 282 CHECK(it != map_.end()); | 282 CHECK(it != map_.end()); |
| 283 // The LHS of a parallel move should not have been assigned in this | 283 // The LHS of a parallel move should not have been assigned in this |
| 284 // parallel move. | 284 // parallel move. |
| 285 // TODO(mtrofin): this check fails when generating code for | 285 // TODO(mtrofin): this check fails when generating code for |
|
Benedikt Meurer
2016/04/23 12:04:49
Remove the TODO here.
Mircea Trofin
2016/04/23 16:27:07
Done.
| |
| 286 // CodeStubAssembler::ChangeUint32ToTagged. | 286 // CodeStubAssembler::ChangeUint32ToTagged. |
| 287 // CHECK(map_for_moves_.find(move->destination()) == map_for_moves_.end()); | 287 CHECK(map_for_moves_.find(move->destination()) == map_for_moves_.end()); |
| 288 // Copy the assessment to the destination. | 288 // Copy the assessment to the destination. |
| 289 map_for_moves_[move->destination()] = it->second; | 289 map_for_moves_[move->destination()] = it->second; |
| 290 } | 290 } |
| 291 for (auto pair : map_for_moves_) { | 291 for (auto pair : map_for_moves_) { |
| 292 map_[pair.first] = pair.second; | 292 map_[pair.first] = pair.second; |
| 293 } | 293 } |
| 294 map_for_moves_.clear(); | 294 map_for_moves_.clear(); |
| 295 } | 295 } |
| 296 | 296 |
| 297 void BlockAssessments::DropRegisters() { | 297 void BlockAssessments::DropRegisters() { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 411 | 411 |
| 412 switch (contribution->kind()) { | 412 switch (contribution->kind()) { |
| 413 case Final: | 413 case Final: |
| 414 ValidateFinalAssessment( | 414 ValidateFinalAssessment( |
| 415 block_id, current_operand, current_assessments, | 415 block_id, current_operand, current_assessments, |
| 416 FinalAssessment::cast(contribution), expected); | 416 FinalAssessment::cast(contribution), expected); |
| 417 break; | 417 break; |
| 418 case Pending: { | 418 case Pending: { |
| 419 // This happens if we have a diamond feeding into another one, and | 419 // This happens if we have a diamond feeding into another one, and |
| 420 // the inner one never being used - other than for carrying the value. | 420 // the inner one never being used - other than for carrying the value. |
| 421 PendingAssessment* next = PendingAssessment::cast(contribution); | 421 const PendingAssessment* next = PendingAssessment::cast(contribution); |
| 422 if (seen.find(pred) == seen.end()) { | 422 if (seen.find(pred) == seen.end()) { |
| 423 worklist.push({next, expected}); | 423 worklist.push({next, expected}); |
| 424 seen.insert(pred); | 424 seen.insert(pred); |
| 425 } | 425 } |
| 426 // Note that we do not want to finalize pending assessments at the | 426 // Note that we do not want to finalize pending assessments at the |
| 427 // beginning of a block - which is the information we'd have | 427 // beginning of a block - which is the information we'd have |
| 428 // available here. This is because this operand may be reused to | 428 // available here. This is because this operand may be reused to |
| 429 // define | 429 // define |
| 430 // duplicate phis. | 430 // duplicate phis. |
| 431 break; | 431 break; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 553 new (zone()) FinalAssessment(vreg, pending); | 553 new (zone()) FinalAssessment(vreg, pending); |
| 554 break; | 554 break; |
| 555 } | 555 } |
| 556 } | 556 } |
| 557 } | 557 } |
| 558 } | 558 } |
| 559 | 559 |
| 560 } // namespace compiler | 560 } // namespace compiler |
| 561 } // namespace internal | 561 } // namespace internal |
| 562 } // namespace v8 | 562 } // namespace v8 |
| OLD | NEW |