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

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

Issue 556453006: Fix register hinting for phis. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « runtime/vm/flow_graph_allocator.h ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 // 746 //
747 // g g' 747 // g g'
748 // value --* 748 // value --*
749 // 749 //
750 750
751 const intptr_t vreg = val->definition()->ssa_temp_index(); 751 const intptr_t vreg = val->definition()->ssa_temp_index();
752 LiveRange* range = GetLiveRange(vreg); 752 LiveRange* range = GetLiveRange(vreg);
753 if (interfere_at_backedge != NULL) interfere_at_backedge->Add(vreg); 753 if (interfere_at_backedge != NULL) interfere_at_backedge->Add(vreg);
754 754
755 range->AddUseInterval(block->start_pos(), pos); 755 range->AddUseInterval(block->start_pos(), pos);
756 range->AddHintedUse(pos, move->src_slot(), move->dest_slot()); 756 range->AddHintedUse(
757 pos,
758 move->src_slot(),
759 GetLiveRange(phi->ssa_temp_index())->assigned_location_slot());
757 760
758 move->set_src(Location::PrefersRegister()); 761 move->set_src(Location::PrefersRegister());
759 move_idx++; 762 move_idx++;
760 } 763 }
761 764
762 // Begin backward iteration with the instruction before the parallel 765 // Begin backward iteration with the instruction before the parallel
763 // move. 766 // move.
764 return goto_instr->previous(); 767 return goto_instr->previous();
765 } 768 }
766 769
(...skipping 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2920 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", 2923 OS::Print("-- [after ssa allocator] ir [%s] -------------\n",
2921 function.ToFullyQualifiedCString()); 2924 function.ToFullyQualifiedCString());
2922 FlowGraphPrinter printer(flow_graph_, true); 2925 FlowGraphPrinter printer(flow_graph_, true);
2923 printer.PrintBlocks(); 2926 printer.PrintBlocks();
2924 OS::Print("----------------------------------------------\n"); 2927 OS::Print("----------------------------------------------\n");
2925 } 2928 }
2926 } 2929 }
2927 2930
2928 2931
2929 } // namespace dart 2932 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_allocator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698