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

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

Issue 1732483002: Rename FlowGraphOptimizer -> JitOptimizer, clean up optimizer code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/aot_optimizer.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) 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/block_scheduler.h" 10 #include "vm/block_scheduler.h"
11 #include "vm/branch_optimizer.h" 11 #include "vm/branch_optimizer.h"
12 #include "vm/cha.h" 12 #include "vm/cha.h"
13 #include "vm/code_generator.h" 13 #include "vm/code_generator.h"
14 #include "vm/code_patcher.h" 14 #include "vm/code_patcher.h"
15 #include "vm/constant_propagator.h" 15 #include "vm/constant_propagator.h"
16 #include "vm/dart_entry.h" 16 #include "vm/dart_entry.h"
17 #include "vm/debugger.h" 17 #include "vm/debugger.h"
18 #include "vm/deopt_instructions.h" 18 #include "vm/deopt_instructions.h"
19 #include "vm/disassembler.h" 19 #include "vm/disassembler.h"
20 #include "vm/exceptions.h" 20 #include "vm/exceptions.h"
21 #include "vm/flags.h" 21 #include "vm/flags.h"
22 #include "vm/flow_graph.h" 22 #include "vm/flow_graph.h"
23 #include "vm/flow_graph_allocator.h" 23 #include "vm/flow_graph_allocator.h"
24 #include "vm/flow_graph_builder.h" 24 #include "vm/flow_graph_builder.h"
25 #include "vm/flow_graph_compiler.h" 25 #include "vm/flow_graph_compiler.h"
26 #include "vm/flow_graph_inliner.h" 26 #include "vm/flow_graph_inliner.h"
27 #include "vm/flow_graph_optimizer.h"
28 #include "vm/flow_graph_range_analysis.h" 27 #include "vm/flow_graph_range_analysis.h"
29 #include "vm/flow_graph_type_propagator.h" 28 #include "vm/flow_graph_type_propagator.h"
30 #include "vm/il_printer.h" 29 #include "vm/il_printer.h"
30 #include "vm/jit_optimizer.h"
31 #include "vm/longjump.h" 31 #include "vm/longjump.h"
32 #include "vm/object.h" 32 #include "vm/object.h"
33 #include "vm/object_store.h" 33 #include "vm/object_store.h"
34 #include "vm/os.h" 34 #include "vm/os.h"
35 #include "vm/parser.h" 35 #include "vm/parser.h"
36 #include "vm/precompiler.h" 36 #include "vm/precompiler.h"
37 #include "vm/redundancy_elimination.h" 37 #include "vm/redundancy_elimination.h"
38 #include "vm/regexp_parser.h" 38 #include "vm/regexp_parser.h"
39 #include "vm/regexp_assembler.h" 39 #include "vm/regexp_assembler.h"
40 #include "vm/symbols.h" 40 #include "vm/symbols.h"
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 // potentially affect optimizations. 680 // potentially affect optimizations.
681 if (optimized()) { 681 if (optimized()) {
682 NOT_IN_PRODUCT(TimelineDurationScope tds(thread(), 682 NOT_IN_PRODUCT(TimelineDurationScope tds(thread(),
683 compiler_timeline, 683 compiler_timeline,
684 "OptimizationPasses")); 684 "OptimizationPasses"));
685 inline_id_to_function.Add(&function); 685 inline_id_to_function.Add(&function);
686 // Top scope function has no caller (-1). 686 // Top scope function has no caller (-1).
687 caller_inline_id.Add(-1); 687 caller_inline_id.Add(-1);
688 CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer); 688 CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer);
689 689
690 FlowGraphOptimizer optimizer(flow_graph, 690 JitOptimizer optimizer(flow_graph);
691 use_speculative_inlining, 691
692 NULL);
693 optimizer.ApplyICData(); 692 optimizer.ApplyICData();
694 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 693 DEBUG_ASSERT(flow_graph->VerifyUseLists());
695 694
696 // Optimize (a << b) & c patterns, merge operations. 695 // Optimize (a << b) & c patterns, merge operations.
697 // Run early in order to have more opportunity to optimize left shifts. 696 // Run early in order to have more opportunity to optimize left shifts.
698 optimizer.TryOptimizePatterns(); 697 optimizer.TryOptimizePatterns();
699 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 698 DEBUG_ASSERT(flow_graph->VerifyUseLists());
700 699
701 FlowGraphInliner::SetInliningId(flow_graph, 0); 700 FlowGraphInliner::SetInliningId(flow_graph, 0);
702 701
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 } 1837 }
1839 1838
1840 1839
1841 void BackgroundCompiler::EnsureInit(Thread* thread) { 1840 void BackgroundCompiler::EnsureInit(Thread* thread) {
1842 UNREACHABLE(); 1841 UNREACHABLE();
1843 } 1842 }
1844 1843
1845 #endif // DART_PRECOMPILED_RUNTIME 1844 #endif // DART_PRECOMPILED_RUNTIME
1846 1845
1847 } // namespace dart 1846 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/aot_optimizer.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698