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

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

Issue 785993002: [turbofan] delay inserting spill slots for parent ranges. (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
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);
280 auto cur = locations()->find(i->source()); 279 auto cur = locations()->find(i->source());
281 CHECK(cur != locations()->end()); 280 CHECK(cur != locations()->end());
282 if (i->destination()->kind() == InstructionOperand::INVALID) continue;
283 to_insert.insert(std::make_pair(i->destination(), cur->second)); 281 to_insert.insert(std::make_pair(i->destination(), cur->second));
284 } 282 }
285 // Drop current mappings. 283 // Drop current mappings.
286 for (auto i = moves->begin(); i != moves->end(); ++i) { 284 for (auto i = moves->begin(); i != moves->end(); ++i) {
287 if (i->IsEliminated()) continue; 285 if (i->IsEliminated()) continue;
288 auto cur = locations()->find(i->destination()); 286 auto cur = locations()->find(i->destination());
289 if (cur != locations()->end()) locations()->erase(cur); 287 if (cur != locations()->end()) locations()->erase(cur);
290 } 288 }
291 // Insert new values. 289 // Insert new values.
292 locations()->insert(to_insert.begin(), to_insert.end()); 290 locations()->insert(to_insert.begin(), to_insert.end());
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 const auto* gap = GapInstruction::cast(instr); 451 const auto* gap = GapInstruction::cast(instr);
454 current->RunGapInstruction(zone(), gap); 452 current->RunGapInstruction(zone(), gap);
455 } 453 }
456 } 454 }
457 } 455 }
458 } 456 }
459 457
460 } // namespace compiler 458 } // namespace compiler
461 } // namespace internal 459 } // namespace internal
462 } // namespace v8 460 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | test/unittests/compiler/register-allocator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698