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

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

Issue 10983024: Disregard constants with no SSA temp index in register allocator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | 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 (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/flow_graph_allocator.h" 5 #include "vm/flow_graph_allocator.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/il_printer.h" 9 #include "vm/il_printer.h"
10 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 780
781 // Create and update live ranges corresponding to instruction's inputs, 781 // Create and update live ranges corresponding to instruction's inputs,
782 // temporaries and output. 782 // temporaries and output.
783 void FlowGraphAllocator::ProcessOneInstruction(BlockEntryInstr* block, 783 void FlowGraphAllocator::ProcessOneInstruction(BlockEntryInstr* block,
784 Instruction* current) { 784 Instruction* current) {
785 LocationSummary* locs = current->locs(); 785 LocationSummary* locs = current->locs();
786 786
787 Definition* def = current->AsDefinition(); 787 Definition* def = current->AsDefinition();
788 if ((def != NULL) && 788 if ((def != NULL) &&
789 (def->AsConstant() != NULL) && 789 (def->AsConstant() != NULL) &&
790 (GetLiveRange(def->ssa_temp_index())->first_use() == NULL)) { 790 ((def->ssa_temp_index() == -1) ||
791 (GetLiveRange(def->ssa_temp_index())->first_use() == NULL))) {
791 // Drop definitions of constants that have no uses. 792 // Drop definitions of constants that have no uses.
792 locs->set_out(Location::NoLocation()); 793 locs->set_out(Location::NoLocation());
793 return; 794 return;
794 } 795 }
795 796
796 const intptr_t pos = current->lifetime_position(); 797 const intptr_t pos = current->lifetime_position();
797 ASSERT(IsInstructionStartPosition(pos)); 798 ASSERT(IsInstructionStartPosition(pos));
798 799
799 // Number of input locations and number of input operands have to agree. 800 // Number of input locations and number of input operands have to agree.
800 ASSERT(locs->input_count() == current->InputCount()); 801 ASSERT(locs->input_count() == current->InputCount());
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2204 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", 2205 OS::Print("-- [after ssa allocator] ir [%s] -------------\n",
2205 function.ToFullyQualifiedCString()); 2206 function.ToFullyQualifiedCString());
2206 FlowGraphPrinter printer(flow_graph_, true); 2207 FlowGraphPrinter printer(flow_graph_, true);
2207 printer.PrintBlocks(); 2208 printer.PrintBlocks();
2208 OS::Print("----------------------------------------------\n"); 2209 OS::Print("----------------------------------------------\n");
2209 } 2210 }
2210 } 2211 }
2211 2212
2212 2213
2213 } // namespace dart 2214 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698