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

Side by Side Diff: runtime/vm/flow_graph_inliner.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/compiler.cc ('k') | runtime/vm/flow_graph_optimizer.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"
11 #include "vm/flags.h" 11 #include "vm/flags.h"
12 #include "vm/flow_graph.h" 12 #include "vm/flow_graph.h"
13 #include "vm/flow_graph_builder.h" 13 #include "vm/flow_graph_builder.h"
14 #include "vm/flow_graph_compiler.h" 14 #include "vm/flow_graph_compiler.h"
15 #include "vm/flow_graph_optimizer.h"
16 #include "vm/flow_graph_type_propagator.h" 15 #include "vm/flow_graph_type_propagator.h"
17 #include "vm/il_printer.h" 16 #include "vm/il_printer.h"
18 #include "vm/intrinsifier.h" 17 #include "vm/intrinsifier.h"
18 #include "vm/jit_optimizer.h"
19 #include "vm/longjump.h" 19 #include "vm/longjump.h"
20 #include "vm/object.h" 20 #include "vm/object.h"
21 #include "vm/object_store.h" 21 #include "vm/object_store.h"
22 #include "vm/timer.h" 22 #include "vm/timer.h"
23 23
24 namespace dart { 24 namespace dart {
25 25
26 DEFINE_FLAG(int, deoptimization_counter_inlining_threshold, 12, 26 DEFINE_FLAG(int, deoptimization_counter_inlining_threshold, 12,
27 "How many times we allow deoptimization before we stop inlining."); 27 "How many times we allow deoptimization before we stop inlining.");
28 DEFINE_FLAG(bool, trace_inlining, false, "Trace inlining"); 28 DEFINE_FLAG(bool, trace_inlining, false, "Trace inlining");
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 803 DEBUG_ASSERT(callee_graph->VerifyUseLists());
804 804
805 optimizer.ApplyICData(); 805 optimizer.ApplyICData();
806 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 806 DEBUG_ASSERT(callee_graph->VerifyUseLists());
807 807
808 // Optimize (a << b) & c patterns, merge instructions. Must occur 808 // Optimize (a << b) & c patterns, merge instructions. Must occur
809 // before 'SelectRepresentations' which inserts conversion nodes. 809 // before 'SelectRepresentations' which inserts conversion nodes.
810 optimizer.TryOptimizePatterns(); 810 optimizer.TryOptimizePatterns();
811 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 811 DEBUG_ASSERT(callee_graph->VerifyUseLists());
812 } else { 812 } else {
813 FlowGraphOptimizer optimizer(callee_graph, 813 JitOptimizer optimizer(callee_graph);
814 inliner_->use_speculative_inlining_,
815 inliner_->inlining_black_list_);
816 optimizer.ApplyICData(); 814 optimizer.ApplyICData();
817 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 815 DEBUG_ASSERT(callee_graph->VerifyUseLists());
818 816
819 // Optimize (a << b) & c patterns, merge instructions. Must occur 817 // Optimize (a << b) & c patterns, merge instructions. Must occur
820 // before 'SelectRepresentations' which inserts conversion nodes. 818 // before 'SelectRepresentations' which inserts conversion nodes.
821 optimizer.TryOptimizePatterns(); 819 optimizer.TryOptimizePatterns();
822 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 820 DEBUG_ASSERT(callee_graph->VerifyUseLists());
823 } 821 }
824 } 822 }
825 823
(...skipping 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after
3057 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last); 3055 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last);
3058 case MethodRecognizer::kDoubleDiv: 3056 case MethodRecognizer::kDoubleDiv:
3059 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last); 3057 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last);
3060 default: 3058 default:
3061 return false; 3059 return false;
3062 } 3060 }
3063 } 3061 }
3064 3062
3065 3063
3066 } // namespace dart 3064 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698