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

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

Issue 10666026: Simple iterative liveness analysis over SSA. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // generated code. 190 // generated code.
191 intptr_t length = graph_builder.postorder_block_entries().length(); 191 intptr_t length = graph_builder.postorder_block_entries().length();
192 for (intptr_t i = length - 1; i >= 0; --i) { 192 for (intptr_t i = length - 1; i >= 0; --i) {
193 block_order.Add(graph_builder.postorder_block_entries()[i]); 193 block_order.Add(graph_builder.postorder_block_entries()[i]);
194 } 194 }
195 if (optimized) { 195 if (optimized) {
196 FlowGraphOptimizer optimizer(block_order); 196 FlowGraphOptimizer optimizer(block_order);
197 optimizer.ApplyICData(); 197 optimizer.ApplyICData();
198 198
199 if (FLAG_use_ssa) { 199 if (FLAG_use_ssa) {
200 printf("====================================\n");
srdjan 2012/06/25 17:30:05 remove print
200 // Perform register allocation on the SSA graph. 201 // Perform register allocation on the SSA graph.
201 FlowGraphAllocator allocator(block_order); 202 FlowGraphAllocator allocator(graph_builder.postorder_block_entries(),
203 graph_builder.current_ssa_temp_index());
202 allocator.ResolveConstraints(); 204 allocator.ResolveConstraints();
205 allocator.AnalyzeLiveness();
203 206
204 // Temporary bailout until we support code generation from SSA form. 207 // Temporary bailout until we support code generation from SSA form.
205 graph_builder.Bailout("No SSA code generation support."); 208 graph_builder.Bailout("No SSA code generation support.");
206 } 209 }
207 } 210 }
208 } 211 }
209 212
210 Assembler assembler; 213 Assembler assembler;
211 FlowGraphCompiler graph_compiler(&assembler, parsed_function, 214 FlowGraphCompiler graph_compiler(&assembler, parsed_function,
212 block_order, optimized); 215 block_order, optimized);
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 isolate->object_store()->clear_sticky_error(); 582 isolate->object_store()->clear_sticky_error();
580 isolate->set_long_jump_base(base); 583 isolate->set_long_jump_base(base);
581 return result.raw(); 584 return result.raw();
582 } 585 }
583 UNREACHABLE(); 586 UNREACHABLE();
584 return Object::null(); 587 return Object::null();
585 } 588 }
586 589
587 590
588 } // namespace dart 591 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698