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

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

Issue 11043016: Set previous instruction pointers when building the graph. (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 | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | 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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 } 1052 }
1053 1053
1054 1054
1055 static ParallelMoveInstr* CreateParallelMoveBefore(Instruction* instr, 1055 static ParallelMoveInstr* CreateParallelMoveBefore(Instruction* instr,
1056 intptr_t pos) { 1056 intptr_t pos) {
1057 ASSERT(pos > 0); 1057 ASSERT(pos > 0);
1058 Instruction* prev = instr->previous(); 1058 Instruction* prev = instr->previous();
1059 ParallelMoveInstr* move = prev->AsParallelMove(); 1059 ParallelMoveInstr* move = prev->AsParallelMove();
1060 if ((move == NULL) || (move->lifetime_position() != pos)) { 1060 if ((move == NULL) || (move->lifetime_position() != pos)) {
1061 move = new ParallelMoveInstr(); 1061 move = new ParallelMoveInstr();
1062 move->set_next(prev->next()); 1062 prev->LinkTo(move);
1063 prev->set_next(move); 1063 move->LinkTo(instr);
1064 move->next()->set_previous(move);
1065 move->set_previous(prev);
1066 move->set_lifetime_position(pos); 1064 move->set_lifetime_position(pos);
1067 } 1065 }
1068 return move; 1066 return move;
1069 } 1067 }
1070 1068
1071 1069
1072 static ParallelMoveInstr* CreateParallelMoveAfter(Instruction* instr, 1070 static ParallelMoveInstr* CreateParallelMoveAfter(Instruction* instr,
1073 intptr_t pos) { 1071 intptr_t pos) {
1074 Instruction* next = instr->next(); 1072 Instruction* next = instr->next();
1075 if (next->IsParallelMove() && (next->lifetime_position() == pos)) { 1073 if (next->IsParallelMove() && (next->lifetime_position() == pos)) {
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2238 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", 2236 OS::Print("-- [after ssa allocator] ir [%s] -------------\n",
2239 function.ToFullyQualifiedCString()); 2237 function.ToFullyQualifiedCString());
2240 FlowGraphPrinter printer(flow_graph_, true); 2238 FlowGraphPrinter printer(flow_graph_, true);
2241 printer.PrintBlocks(); 2239 printer.PrintBlocks();
2242 OS::Print("----------------------------------------------\n"); 2240 OS::Print("----------------------------------------------\n");
2243 } 2241 }
2244 } 2242 }
2245 2243
2246 2244
2247 } // namespace dart 2245 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698