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

Side by Side Diff: runtime/vm/flow_graph_compiler.cc

Issue 10910252: Improve register usage for StoreInstanceField. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 blocked_registers[TMP] = true; 653 blocked_registers[TMP] = true;
654 } 654 }
655 655
656 // Allocate all unallocated input locations. 656 // Allocate all unallocated input locations.
657 const bool should_pop = !instr->IsPushArgument(); 657 const bool should_pop = !instr->IsPushArgument();
658 for (intptr_t i = locs->input_count() - 1; i >= 0; i--) { 658 for (intptr_t i = locs->input_count() - 1; i >= 0; i--) {
659 Location loc = locs->in(i); 659 Location loc = locs->in(i);
660 Register reg = kNoRegister; 660 Register reg = kNoRegister;
661 if (loc.IsRegister()) { 661 if (loc.IsRegister()) {
662 reg = loc.reg(); 662 reg = loc.reg();
663 } else if (loc.IsUnallocated()) { 663 } else if (loc.IsUnallocated() || loc.IsConstant()) {
664 ASSERT((loc.policy() == Location::kRequiresRegister) || 664 ASSERT(loc.IsConstant() ||
665 (loc.policy() == Location::kWritableRegister)); 665 ((loc.policy() == Location::kRequiresRegister) ||
666 (loc.policy() == Location::kWritableRegister)));
666 reg = AllocateFreeRegister(blocked_registers); 667 reg = AllocateFreeRegister(blocked_registers);
667 locs->set_in(i, Location::RegisterLocation(reg)); 668 locs->set_in(i, Location::RegisterLocation(reg));
668 } 669 }
670 ASSERT(reg != kNoRegister);
669 671
670 // Inputs are consumed from the simulated frame. In case of a call argument 672 // Inputs are consumed from the simulated frame. In case of a call argument
671 // we leave it until the call instruction. 673 // we leave it until the call instruction.
672 if (should_pop) { 674 if (should_pop) {
673 assembler()->PopRegister(reg); 675 assembler()->PopRegister(reg);
674 } 676 }
675 } 677 }
676 678
677 // Allocate all unallocated temp locations. 679 // Allocate all unallocated temp locations.
678 for (intptr_t i = 0; i < locs->temp_count(); i++) { 680 for (intptr_t i = 0; i < locs->temp_count(); i++) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 case ABOVE: return unsigned_left > unsigned_right; 853 case ABOVE: return unsigned_left > unsigned_right;
852 case ABOVE_EQUAL: return unsigned_left >= unsigned_right; 854 case ABOVE_EQUAL: return unsigned_left >= unsigned_right;
853 default: 855 default:
854 UNIMPLEMENTED(); 856 UNIMPLEMENTED();
855 return false; 857 return false;
856 } 858 }
857 } 859 }
858 860
859 861
860 } // namespace dart 862 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | runtime/vm/intermediate_language_ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698