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

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

Issue 11362210: Restrict immediate operands to smi where only smis are supported. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/disassembler_x64.cc ('k') | runtime/vm/intermediate_language_ia32.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_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/flow_graph_builder.h" 9 #include "vm/flow_graph_builder.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 14 matching lines...) Expand all
25 DECLARE_FLAG(bool, trace_type_check_elimination); 25 DECLARE_FLAG(bool, trace_type_check_elimination);
26 DEFINE_FLAG(bool, use_cha, true, "Use class hierarchy analysis."); 26 DEFINE_FLAG(bool, use_cha, true, "Use class hierarchy analysis.");
27 DEFINE_FLAG(bool, load_cse, true, "Use redundant load elimination."); 27 DEFINE_FLAG(bool, load_cse, true, "Use redundant load elimination.");
28 DEFINE_FLAG(bool, trace_range_analysis, false, "Trace range analysis progress"); 28 DEFINE_FLAG(bool, trace_range_analysis, false, "Trace range analysis progress");
29 DEFINE_FLAG(bool, trace_constant_propagation, false, 29 DEFINE_FLAG(bool, trace_constant_propagation, false,
30 "Print constant propagation and useless code elimination."); 30 "Print constant propagation and useless code elimination.");
31 DEFINE_FLAG(bool, array_bounds_check_elimination, true, 31 DEFINE_FLAG(bool, array_bounds_check_elimination, true,
32 "Eliminate redundant bounds checks."); 32 "Eliminate redundant bounds checks.");
33 DEFINE_FLAG(int, max_polymorphic_checks, 4, 33 DEFINE_FLAG(int, max_polymorphic_checks, 4,
34 "Maximum number of polymorphic check, otherwise it is megamorphic."); 34 "Maximum number of polymorphic check, otherwise it is megamorphic.");
35 DEFINE_FLAG(bool, remove_redundant_phis, false, 35 DEFINE_FLAG(bool, remove_redundant_phis, true, "Remove redundant phis.");
36 "Remove redundant phis (disabled as causes incorrect code).");
37 36
38 37
39 void FlowGraphOptimizer::ApplyICData() { 38 void FlowGraphOptimizer::ApplyICData() {
40 VisitBlocks(); 39 VisitBlocks();
41 } 40 }
42 41
43 42
44 // Attempts to convert an instance call (IC call) using propagated class-ids, 43 // Attempts to convert an instance call (IC call) using propagated class-ids,
45 // e.g., receiver class id. 44 // e.g., receiver class id.
46 void FlowGraphOptimizer::ApplyClassIds() { 45 void FlowGraphOptimizer::ApplyClassIds() {
(...skipping 3686 matching lines...) Expand 10 before | Expand all | Expand 10 after
3733 3732
3734 if (FLAG_trace_constant_propagation) { 3733 if (FLAG_trace_constant_propagation) {
3735 OS::Print("\n==== After constant propagation ====\n"); 3734 OS::Print("\n==== After constant propagation ====\n");
3736 FlowGraphPrinter printer(*graph_); 3735 FlowGraphPrinter printer(*graph_);
3737 printer.PrintBlocks(); 3736 printer.PrintBlocks();
3738 } 3737 }
3739 } 3738 }
3740 3739
3741 3740
3742 } // namespace dart 3741 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/disassembler_x64.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698