OLD | NEW |
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_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/dart_entry.h" | 9 #include "vm/dart_entry.h" |
10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 DEFINE_FLAG(bool, remove_redundant_phis, true, "Remove redundant phis."); | 32 DEFINE_FLAG(bool, remove_redundant_phis, true, "Remove redundant phis."); |
33 DEFINE_FLAG(bool, trace_constant_propagation, false, | 33 DEFINE_FLAG(bool, trace_constant_propagation, false, |
34 "Print constant propagation and useless code elimination."); | 34 "Print constant propagation and useless code elimination."); |
35 DEFINE_FLAG(bool, trace_optimization, false, "Print optimization details."); | 35 DEFINE_FLAG(bool, trace_optimization, false, "Print optimization details."); |
36 DEFINE_FLAG(bool, trace_range_analysis, false, "Trace range analysis progress"); | 36 DEFINE_FLAG(bool, trace_range_analysis, false, "Trace range analysis progress"); |
37 DEFINE_FLAG(bool, truncating_left_shift, true, | 37 DEFINE_FLAG(bool, truncating_left_shift, true, |
38 "Optimize left shift to truncate if possible"); | 38 "Optimize left shift to truncate if possible"); |
39 DEFINE_FLAG(bool, use_cha, true, "Use class hierarchy analysis."); | 39 DEFINE_FLAG(bool, use_cha, true, "Use class hierarchy analysis."); |
40 DEFINE_FLAG(bool, trace_load_optimization, false, | 40 DEFINE_FLAG(bool, trace_load_optimization, false, |
41 "Print live sets for load optimization pass."); | 41 "Print live sets for load optimization pass."); |
42 DEFINE_FLAG(bool, enable_simd_inline, true, | |
43 "Enable inlining of SIMD related method calls."); | |
44 DEFINE_FLAG(int, getter_setter_ratio, 13, | 42 DEFINE_FLAG(int, getter_setter_ratio, 13, |
45 "Ratio of getter/setter usage used for double field unboxing heuristics"); | 43 "Ratio of getter/setter usage used for double field unboxing heuristics"); |
46 DECLARE_FLAG(bool, eliminate_type_checks); | 44 DECLARE_FLAG(bool, eliminate_type_checks); |
47 DECLARE_FLAG(bool, enable_type_checks); | 45 DECLARE_FLAG(bool, enable_type_checks); |
48 DECLARE_FLAG(bool, trace_type_check_elimination); | 46 DECLARE_FLAG(bool, trace_type_check_elimination); |
49 | 47 |
50 | 48 |
51 static bool ShouldInlineSimd() { | 49 static bool ShouldInlineSimd() { |
52 #if defined(TARGET_ARCH_MIPS) | 50 return FlowGraphCompiler::SupportsUnboxedFloat32x4(); |
53 return false; | |
54 #elif defined(TARGET_ARCH_ARM) | |
55 return CPUFeatures::neon_supported() && FLAG_enable_simd_inline; | |
56 #endif | |
57 return FLAG_enable_simd_inline; | |
58 } | 51 } |
59 | 52 |
60 | 53 |
61 // Optimize instance calls using ICData. | 54 // Optimize instance calls using ICData. |
62 void FlowGraphOptimizer::ApplyICData() { | 55 void FlowGraphOptimizer::ApplyICData() { |
63 VisitBlocks(); | 56 VisitBlocks(); |
64 } | 57 } |
65 | 58 |
66 | 59 |
67 // Optimize instance calls using cid. This is called after optimizer | 60 // Optimize instance calls using cid. This is called after optimizer |
(...skipping 8404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8472 } | 8465 } |
8473 | 8466 |
8474 // Insert materializations at environment uses. | 8467 // Insert materializations at environment uses. |
8475 for (intptr_t i = 0; i < exits.length(); i++) { | 8468 for (intptr_t i = 0; i < exits.length(); i++) { |
8476 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); | 8469 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); |
8477 } | 8470 } |
8478 } | 8471 } |
8479 | 8472 |
8480 | 8473 |
8481 } // namespace dart | 8474 } // namespace dart |
OLD | NEW |