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

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

Issue 22839003: Polymorphic inlining for some recognized methods in the optimizing compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed modulo performance regression Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/code_generator_test.cc ('k') | runtime/vm/flow_graph_builder.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 // 'SelectRepresentations' which inserts conversion nodes. 335 // 'SelectRepresentations' which inserts conversion nodes.
336 // TODO(srdjan): Moved before inlining until environment use list can 336 // TODO(srdjan): Moved before inlining until environment use list can
337 // be used to detect when shift-left is outside the scope of bit-and. 337 // be used to detect when shift-left is outside the scope of bit-and.
338 optimizer.TryOptimizeLeftShiftWithBitAndPattern(); 338 optimizer.TryOptimizeLeftShiftWithBitAndPattern();
339 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 339 DEBUG_ASSERT(flow_graph->VerifyUseLists());
340 340
341 // Inlining (mutates the flow graph) 341 // Inlining (mutates the flow graph)
342 if (FLAG_use_inlining) { 342 if (FLAG_use_inlining) {
343 TimerScope timer(FLAG_compiler_stats, 343 TimerScope timer(FLAG_compiler_stats,
344 &CompilerStats::graphinliner_timer); 344 &CompilerStats::graphinliner_timer);
345 // Propagate types to create more inlining opportunities.
346 if (FLAG_propagate_types) {
347 FlowGraphTypePropagator propagator(flow_graph);
348 propagator.Propagate();
349 DEBUG_ASSERT(flow_graph->VerifyUseLists());
350 }
351
352 // Use propagated class-ids to create more inlining opportunities.
353 optimizer.ApplyClassIds();
354 DEBUG_ASSERT(flow_graph->VerifyUseLists());
355
345 FlowGraphInliner inliner(flow_graph, &guarded_fields); 356 FlowGraphInliner inliner(flow_graph, &guarded_fields);
346 inliner.Inline(); 357 inliner.Inline();
347 // Use lists are maintained and validated by the inliner. 358 // Use lists are maintained and validated by the inliner.
348 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 359 DEBUG_ASSERT(flow_graph->VerifyUseLists());
349 } 360 }
350 361
351 // Propagate types and eliminate more type tests. 362 // Propagate types and eliminate more type tests.
352 if (FLAG_propagate_types) { 363 if (FLAG_propagate_types) {
353 FlowGraphTypePropagator propagator(flow_graph); 364 FlowGraphTypePropagator propagator(flow_graph);
354 propagator.Propagate(); 365 propagator.Propagate();
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 Object::Handle(isolate->object_store()->sticky_error()); 919 Object::Handle(isolate->object_store()->sticky_error());
909 isolate->object_store()->clear_sticky_error(); 920 isolate->object_store()->clear_sticky_error();
910 isolate->set_long_jump_base(base); 921 isolate->set_long_jump_base(base);
911 return result.raw(); 922 return result.raw();
912 } 923 }
913 UNREACHABLE(); 924 UNREACHABLE();
914 return Object::null(); 925 return Object::null();
915 } 926 }
916 927
917 } // namespace dart 928 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator_test.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698