Chromium Code Reviews| 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/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/cha.h" | 10 #include "vm/cha.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 DECLARE_FLAG(bool, use_field_guards); | 71 DECLARE_FLAG(bool, use_field_guards); |
| 72 DECLARE_FLAG(bool, use_cha_deopt); | 72 DECLARE_FLAG(bool, use_cha_deopt); |
| 73 DECLARE_FLAG(bool, use_osr); | 73 DECLARE_FLAG(bool, use_osr); |
| 74 DECLARE_FLAG(bool, warn_on_javascript_compatibility); | 74 DECLARE_FLAG(bool, warn_on_javascript_compatibility); |
| 75 DECLARE_FLAG(bool, print_stop_message); | 75 DECLARE_FLAG(bool, print_stop_message); |
| 76 DECLARE_FLAG(bool, lazy_dispatchers); | 76 DECLARE_FLAG(bool, lazy_dispatchers); |
| 77 DECLARE_FLAG(bool, interpret_irregexp); | 77 DECLARE_FLAG(bool, interpret_irregexp); |
| 78 DECLARE_FLAG(bool, enable_mirrors); | 78 DECLARE_FLAG(bool, enable_mirrors); |
| 79 DECLARE_FLAG(bool, link_natives_lazily); | 79 DECLARE_FLAG(bool, link_natives_lazily); |
| 80 DECLARE_FLAG(bool, trace_compiler); | 80 DECLARE_FLAG(bool, trace_compiler); |
| 81 DECLARE_FLAG(int, inlining_hotness); | |
| 82 DECLARE_FLAG(int, inlining_size_threshold); | |
| 83 DECLARE_FLAG(int, inlining_callee_size_threshold); | |
| 84 DECLARE_FLAG(int, inline_getters_setters_smaller_than); | |
| 85 DECLARE_FLAG(int, inlining_depth_threshold); | |
| 86 DECLARE_FLAG(int, inlining_caller_size_threshold); | |
| 81 | 87 |
| 82 bool FLAG_precompilation = false; | 88 bool FLAG_precompilation = false; |
| 83 static void PrecompilationModeHandler(bool value) { | 89 static void PrecompilationModeHandler(bool value) { |
| 84 if (value) { | 90 if (value) { |
| 85 #if defined(TARGET_ARCH_IA32) | 91 #if defined(TARGET_ARCH_IA32) |
| 86 FATAL("Precompilation not supported on IA32"); | 92 FATAL("Precompilation not supported on IA32"); |
| 87 #endif | 93 #endif |
| 88 FLAG_precompilation = true; | 94 FLAG_precompilation = true; |
| 89 | 95 |
| 90 FLAG_always_megamorphic_calls = true; | 96 FLAG_always_megamorphic_calls = true; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 111 // since it is done at places where no pool pointer is loaded. | 117 // since it is done at places where no pool pointer is loaded. |
| 112 FLAG_print_stop_message = false; | 118 FLAG_print_stop_message = false; |
| 113 | 119 |
| 114 FLAG_lazy_dispatchers = false; | 120 FLAG_lazy_dispatchers = false; |
| 115 FLAG_interpret_irregexp = true; | 121 FLAG_interpret_irregexp = true; |
| 116 FLAG_enable_mirrors = false; | 122 FLAG_enable_mirrors = false; |
| 117 FLAG_link_natives_lazily = true; | 123 FLAG_link_natives_lazily = true; |
| 118 FLAG_fields_may_be_reset = true; | 124 FLAG_fields_may_be_reset = true; |
| 119 FLAG_allow_absolute_addresses = false; | 125 FLAG_allow_absolute_addresses = false; |
| 120 | 126 |
| 127 // There is no counter feedback in precompilation, so ignore the counter | |
| 128 // when making inlining decisions. | |
| 129 FLAG_inlining_hotness = 0; | |
| 130 // Use smaller thresholds in precompilation as we are compiling everything | |
| 131 // with the optimizing compiler instead of only hot functions. | |
| 132 FLAG_inlining_size_threshold = 5; | |
|
Florian Schneider
2016/01/05 10:01:07
Maybe also scale down FLAG_inlining_constant_argum
rmacnak
2016/01/05 23:50:21
I'll look at those in a separate CL.
| |
| 133 FLAG_inline_getters_setters_smaller_than = 5; | |
| 134 FLAG_inlining_callee_size_threshold = 20; | |
| 135 FLAG_inlining_depth_threshold = 2; | |
| 136 FLAG_inlining_caller_size_threshold = 1000; | |
| 137 | |
| 121 // Background compilation relies on two-stage compilation pipeline, | 138 // Background compilation relies on two-stage compilation pipeline, |
| 122 // while precompilation has only one. | 139 // while precompilation has only one. |
| 123 FLAG_background_compilation = false; | 140 FLAG_background_compilation = false; |
| 124 FLAG_collect_dynamic_function_names = true; | 141 FLAG_collect_dynamic_function_names = true; |
| 125 } | 142 } |
| 126 } | 143 } |
| 127 | 144 |
| 128 | 145 |
| 129 DEFINE_FLAG_HANDLER(PrecompilationModeHandler, | 146 DEFINE_FLAG_HANDLER(PrecompilationModeHandler, |
| 130 precompilation, | 147 precompilation, |
| (...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1860 | 1877 |
| 1861 | 1878 |
| 1862 void FlowGraphCompiler::FrameStateClear() { | 1879 void FlowGraphCompiler::FrameStateClear() { |
| 1863 ASSERT(!is_optimizing()); | 1880 ASSERT(!is_optimizing()); |
| 1864 frame_state_.TruncateTo(0); | 1881 frame_state_.TruncateTo(0); |
| 1865 } | 1882 } |
| 1866 #endif | 1883 #endif |
| 1867 | 1884 |
| 1868 | 1885 |
| 1869 } // namespace dart | 1886 } // namespace dart |
| OLD | NEW |