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

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

Issue 12042014: Revert "Introduce InvokeMathCFunction that can be used to directly invoke mathematical function pro… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | runtime/vm/disassembler_x64.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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 // Use propagated class-ids to optimize further. 205 // Use propagated class-ids to optimize further.
206 optimizer.ApplyClassIds(); 206 optimizer.ApplyClassIds();
207 207
208 // Recompute use lists after applying class ids. 208 // Recompute use lists after applying class ids.
209 flow_graph->ComputeUseLists(); 209 flow_graph->ComputeUseLists();
210 210
211 // Do optimizations that depend on the propagated type information. 211 // Do optimizations that depend on the propagated type information.
212 optimizer.Canonicalize(); 212 optimizer.Canonicalize();
213 213
214 // Unbox doubles.
214 flow_graph->ComputeUseLists(); 215 flow_graph->ComputeUseLists();
216 optimizer.SelectRepresentations();
215 217
218 if (FLAG_constant_propagation ||
219 FLAG_common_subexpression_elimination) {
220 flow_graph->ComputeUseLists();
221 }
216 if (FLAG_constant_propagation) { 222 if (FLAG_constant_propagation) {
217 ConstantPropagator::Optimize(flow_graph); 223 ConstantPropagator::Optimize(flow_graph);
218 // A canonicalization pass to remove e.g. smi checks on smi constants. 224 // A canonicalization pass to remove e.g. smi checks on smi constants.
219 optimizer.Canonicalize(); 225 optimizer.Canonicalize();
220 } 226 }
221
222 // Unbox doubles. Performed after constant propagation to minimize
223 // interference from phis merging double values and tagged
224 // values comming from dead paths.
225 flow_graph->ComputeUseLists();
226 optimizer.SelectRepresentations();
227 flow_graph->ComputeUseLists();
228
229 if (FLAG_common_subexpression_elimination) { 227 if (FLAG_common_subexpression_elimination) {
230 if (DominatorBasedCSE::Optimize(flow_graph)) { 228 if (DominatorBasedCSE::Optimize(flow_graph)) {
231 // Do another round of CSE to take secondary effects into account: 229 // Do another round of CSE to take secondary effects into account:
232 // e.g. when eliminating dependent loads (a.x[0] + a.x[0]) 230 // e.g. when eliminating dependent loads (a.x[0] + a.x[0])
233 // TODO(fschneider): Change to a one-pass optimization pass. 231 // TODO(fschneider): Change to a one-pass optimization pass.
234 DominatorBasedCSE::Optimize(flow_graph); 232 DominatorBasedCSE::Optimize(flow_graph);
235 } 233 }
236 } 234 }
237 if (FLAG_loop_invariant_code_motion && 235 if (FLAG_loop_invariant_code_motion &&
238 (parsed_function.function().deoptimization_counter() < 236 (parsed_function.function().deoptimization_counter() <
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 Object::Handle(isolate->object_store()->sticky_error()); 640 Object::Handle(isolate->object_store()->sticky_error());
643 isolate->object_store()->clear_sticky_error(); 641 isolate->object_store()->clear_sticky_error();
644 isolate->set_long_jump_base(base); 642 isolate->set_long_jump_base(base);
645 return result.raw(); 643 return result.raw();
646 } 644 }
647 UNREACHABLE(); 645 UNREACHABLE();
648 return Object::null(); 646 return Object::null();
649 } 647 }
650 648
651 } // namespace dart 649 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/disassembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698