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

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

Issue 803493002: revert r25736 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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 | « src/compiler/register-allocator.cc ('k') | no next file » | 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/compiler/instruction.h" 5 #include "src/compiler/instruction.h"
6 #include "src/compiler/register-allocator-verifier.h" 6 #include "src/compiler/register-allocator-verifier.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 269 }
270 } 270 }
271 271
272 void RunParallelMoves(Zone* zone, const ParallelMove* move) { 272 void RunParallelMoves(Zone* zone, const ParallelMove* move) {
273 // Compute outgoing mappings. 273 // Compute outgoing mappings.
274 LocationMap to_insert((LocationMap::key_compare()), 274 LocationMap to_insert((LocationMap::key_compare()),
275 LocationMap::allocator_type(zone)); 275 LocationMap::allocator_type(zone));
276 auto* moves = move->move_operands(); 276 auto* moves = move->move_operands();
277 for (auto i = moves->begin(); i != moves->end(); ++i) { 277 for (auto i = moves->begin(); i != moves->end(); ++i) {
278 if (i->IsEliminated()) continue; 278 if (i->IsEliminated()) continue;
279 CHECK(i->source()->kind() != InstructionOperand::INVALID);
279 auto cur = locations()->find(i->source()); 280 auto cur = locations()->find(i->source());
280 CHECK(cur != locations()->end()); 281 CHECK(cur != locations()->end());
282 if (i->destination()->kind() == InstructionOperand::INVALID) continue;
281 to_insert.insert(std::make_pair(i->destination(), cur->second)); 283 to_insert.insert(std::make_pair(i->destination(), cur->second));
282 } 284 }
283 // Drop current mappings. 285 // Drop current mappings.
284 for (auto i = moves->begin(); i != moves->end(); ++i) { 286 for (auto i = moves->begin(); i != moves->end(); ++i) {
285 if (i->IsEliminated()) continue; 287 if (i->IsEliminated()) continue;
286 auto cur = locations()->find(i->destination()); 288 auto cur = locations()->find(i->destination());
287 if (cur != locations()->end()) locations()->erase(cur); 289 if (cur != locations()->end()) locations()->erase(cur);
288 } 290 }
289 // Insert new values. 291 // Insert new values.
290 locations()->insert(to_insert.begin(), to_insert.end()); 292 locations()->insert(to_insert.begin(), to_insert.end());
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 const auto* gap = GapInstruction::cast(instr); 453 const auto* gap = GapInstruction::cast(instr);
452 current->RunGapInstruction(zone(), gap); 454 current->RunGapInstruction(zone(), gap);
453 } 455 }
454 } 456 }
455 } 457 }
456 } 458 }
457 459
458 } // namespace compiler 460 } // namespace compiler
459 } // namespace internal 461 } // namespace internal
460 } // namespace v8 462 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698