| 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 #if !defined(DART_PRECOMPILED_RUNTIME) | 4 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 5 #include "vm/flow_graph_inliner.h" | 5 #include "vm/flow_graph_inliner.h" |
| 6 | 6 |
| 7 #include "vm/aot_optimizer.h" | 7 #include "vm/aot_optimizer.h" |
| 8 #include "vm/block_scheduler.h" | 8 #include "vm/block_scheduler.h" |
| 9 #include "vm/branch_optimizer.h" | 9 #include "vm/branch_optimizer.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 const GrowableArray<CallSites::StaticCallInfo>& call_info = | 1261 const GrowableArray<CallSites::StaticCallInfo>& call_info = |
| 1262 inlining_call_sites_->static_calls(); | 1262 inlining_call_sites_->static_calls(); |
| 1263 TRACE_INLINING(THR_Print(" Static Calls (%" Pd ")\n", call_info.length())); | 1263 TRACE_INLINING(THR_Print(" Static Calls (%" Pd ")\n", call_info.length())); |
| 1264 for (intptr_t call_idx = 0; call_idx < call_info.length(); ++call_idx) { | 1264 for (intptr_t call_idx = 0; call_idx < call_info.length(); ++call_idx) { |
| 1265 StaticCallInstr* call = call_info[call_idx].call; | 1265 StaticCallInstr* call = call_info[call_idx].call; |
| 1266 const Function& target = call->function(); | 1266 const Function& target = call->function(); |
| 1267 if (!inliner_->AlwaysInline(target) && | 1267 if (!inliner_->AlwaysInline(target) && |
| 1268 (call_info[call_idx].ratio * 100) < FLAG_inlining_hotness) { | 1268 (call_info[call_idx].ratio * 100) < FLAG_inlining_hotness) { |
| 1269 if (trace_inlining()) { | 1269 if (trace_inlining()) { |
| 1270 String& name = String::Handle(target.QualifiedUserVisibleName()); | 1270 String& name = String::Handle(target.QualifiedUserVisibleName()); |
| 1271 THR_Print(" => %s (deopt count %d)\n Bailout: cold %f\n", | 1271 THR_Print(" => %s (deopt count %d, optimized instructions %" Pd |
| 1272 ")\n Bailout: cold %f\n", |
| 1272 name.ToCString(), target.deoptimization_counter(), | 1273 name.ToCString(), target.deoptimization_counter(), |
| 1274 target.optimized_instruction_count(), |
| 1273 call_info[call_idx].ratio); | 1275 call_info[call_idx].ratio); |
| 1274 } | 1276 } |
| 1275 PRINT_INLINING_TREE("Too cold", &call_info[call_idx].caller(), | 1277 PRINT_INLINING_TREE("Too cold", &call_info[call_idx].caller(), |
| 1276 &call->function(), call); | 1278 &call->function(), call); |
| 1277 continue; | 1279 continue; |
| 1278 } | 1280 } |
| 1279 GrowableArray<Value*> arguments(call->ArgumentCount()); | 1281 GrowableArray<Value*> arguments(call->ArgumentCount()); |
| 1280 for (int i = 0; i < call->ArgumentCount(); ++i) { | 1282 for (int i = 0; i < call->ArgumentCount(); ++i) { |
| 1281 arguments.Add(call->PushArgumentAt(i)->value()); | 1283 arguments.Add(call->PushArgumentAt(i)->value()); |
| 1282 } | 1284 } |
| (...skipping 2446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3729 return true; | 3731 return true; |
| 3730 } | 3732 } |
| 3731 | 3733 |
| 3732 default: | 3734 default: |
| 3733 return false; | 3735 return false; |
| 3734 } | 3736 } |
| 3735 } | 3737 } |
| 3736 | 3738 |
| 3737 } // namespace dart | 3739 } // namespace dart |
| 3738 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 3740 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| OLD | NEW |