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

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

Issue 1857273002: Fix detection if a function was compiled, (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Comments Created 4 years, 8 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
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/object.h » ('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) 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_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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 630
631 // Don't inline any intrinsified functions in precompiled mode 631 // Don't inline any intrinsified functions in precompiled mode
632 // to reduce code size and make sure we use the intrinsic code. 632 // to reduce code size and make sure we use the intrinsic code.
633 if (FLAG_precompiled_mode && function.is_intrinsic()) { 633 if (FLAG_precompiled_mode && function.is_intrinsic()) {
634 TRACE_INLINING(THR_Print(" Bailout: intrinisic\n")); 634 TRACE_INLINING(THR_Print(" Bailout: intrinisic\n"));
635 PRINT_INLINING_TREE("intrinsic", 635 PRINT_INLINING_TREE("intrinsic",
636 &call_data->caller, &function, call_data->call); 636 &call_data->caller, &function, call_data->call);
637 return false; 637 return false;
638 } 638 }
639 639
640 // Function has no type feedback. With precompilation we don't rely on 640 // Do not rely on function type feedback or presence of code to determine
641 // type feedback. 641 // if a function was compiled.
642 if (!FLAG_precompiled_mode && 642 if (!FLAG_precompiled_mode && !function.was_compiled()) {
643 function.ic_data_array() == Object::null()) {
644 TRACE_INLINING(THR_Print(" Bailout: not compiled yet\n")); 643 TRACE_INLINING(THR_Print(" Bailout: not compiled yet\n"));
645 PRINT_INLINING_TREE("Not compiled", 644 PRINT_INLINING_TREE("Not compiled",
646 &call_data->caller, &function, call_data->call); 645 &call_data->caller, &function, call_data->call);
647 return false; 646 return false;
648 } 647 }
649 648
650 // Abort if this function has deoptimized too much. 649 // Abort if this function has deoptimized too much.
651 if (function.deoptimization_counter() >= 650 if (function.deoptimization_counter() >=
652 FLAG_max_deoptimization_counter_threshold) { 651 FLAG_max_deoptimization_counter_threshold) {
653 function.set_is_inlinable(false); 652 function.set_is_inlinable(false);
(...skipping 2426 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last); 3079 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last);
3081 case MethodRecognizer::kDoubleDiv: 3080 case MethodRecognizer::kDoubleDiv:
3082 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last); 3081 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last);
3083 default: 3082 default:
3084 return false; 3083 return false;
3085 } 3084 }
3086 } 3085 }
3087 3086
3088 3087
3089 } // namespace dart 3088 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698