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

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

Issue 1410733006: More general CHA-based inlining and devirtualization for precompiled code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments, fixed type propagation assertion failure Created 5 years, 2 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/cha.cc ('k') | runtime/vm/flow_graph_inliner.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) 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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 const ICData& ic_data) { 1091 const ICData& ic_data) {
1092 if (FLAG_always_megamorphic_calls) { 1092 if (FLAG_always_megamorphic_calls) {
1093 EmitMegamorphicInstanceCall(ic_data, argument_count, 1093 EmitMegamorphicInstanceCall(ic_data, argument_count,
1094 deopt_id, token_pos, locs); 1094 deopt_id, token_pos, locs);
1095 return; 1095 return;
1096 } 1096 }
1097 ASSERT(!ic_data.IsNull()); 1097 ASSERT(!ic_data.IsNull());
1098 if (is_optimizing() && (ic_data.NumberOfUsedChecks() == 0)) { 1098 if (is_optimizing() && (ic_data.NumberOfUsedChecks() == 0)) {
1099 // Emit IC call that will count and thus may need reoptimization at 1099 // Emit IC call that will count and thus may need reoptimization at
1100 // function entry. 1100 // function entry.
1101 ASSERT(!is_optimizing() 1101 ASSERT(may_reoptimize() || flow_graph().IsCompiledForOsr());
1102 || may_reoptimize()
1103 || flow_graph().IsCompiledForOsr());
1104 switch (ic_data.NumArgsTested()) { 1102 switch (ic_data.NumArgsTested()) {
1105 case 1: 1103 case 1:
1106 EmitOptimizedInstanceCall( 1104 EmitOptimizedInstanceCall(
1107 *StubCode::OneArgOptimizedCheckInlineCache_entry(), ic_data, 1105 *StubCode::OneArgOptimizedCheckInlineCache_entry(), ic_data,
1108 argument_count, deopt_id, token_pos, locs); 1106 argument_count, deopt_id, token_pos, locs);
1109 return; 1107 return;
1110 case 2: 1108 case 2:
1111 EmitOptimizedInstanceCall( 1109 EmitOptimizedInstanceCall(
1112 *StubCode::TwoArgsOptimizedCheckInlineCache_entry(), ic_data, 1110 *StubCode::TwoArgsOptimizedCheckInlineCache_entry(), ic_data,
1113 argument_count, deopt_id, token_pos, locs); 1111 argument_count, deopt_id, token_pos, locs);
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1817 1815
1818 1816
1819 void FlowGraphCompiler::FrameStateClear() { 1817 void FlowGraphCompiler::FrameStateClear() {
1820 ASSERT(!is_optimizing()); 1818 ASSERT(!is_optimizing());
1821 frame_state_.TruncateTo(0); 1819 frame_state_.TruncateTo(0);
1822 } 1820 }
1823 #endif 1821 #endif
1824 1822
1825 1823
1826 } // namespace dart 1824 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/cha.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698