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

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

Issue 2314133003: AOT: Use a cid range check when possible to implement type tests. (Closed)
Patch Set: symbols Created 4 years, 3 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/flow_graph_compiler.h ('k') | runtime/vm/intermediate_language.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/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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 callee_graph->ComputeSSA(caller_graph_->max_virtual_register_number(), 821 callee_graph->ComputeSSA(caller_graph_->max_virtual_register_number(),
822 param_stubs); 822 param_stubs);
823 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 823 DEBUG_ASSERT(callee_graph->VerifyUseLists());
824 } 824 }
825 825
826 { 826 {
827 CSTAT_TIMER_SCOPE(thread(), graphinliner_opt_timer); 827 CSTAT_TIMER_SCOPE(thread(), graphinliner_opt_timer);
828 // TODO(fschneider): Improve suppression of speculative inlining. 828 // TODO(fschneider): Improve suppression of speculative inlining.
829 // Deopt-ids overlap between caller and callee. 829 // Deopt-ids overlap between caller and callee.
830 if (FLAG_precompiled_mode) { 830 if (FLAG_precompiled_mode) {
831 #ifdef DART_PRECOMPILER
831 AotOptimizer optimizer(callee_graph, 832 AotOptimizer optimizer(callee_graph,
832 inliner_->use_speculative_inlining_, 833 inliner_->use_speculative_inlining_,
833 inliner_->inlining_black_list_); 834 inliner_->inlining_black_list_);
834 optimizer.PopulateWithICData(); 835 optimizer.PopulateWithICData();
835 836
836 optimizer.ApplyClassIds(); 837 optimizer.ApplyClassIds();
837 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 838 DEBUG_ASSERT(callee_graph->VerifyUseLists());
838 839
839 FlowGraphTypePropagator::Propagate(callee_graph); 840 FlowGraphTypePropagator::Propagate(callee_graph);
840 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 841 DEBUG_ASSERT(callee_graph->VerifyUseLists());
841 842
842 optimizer.ApplyICData(); 843 optimizer.ApplyICData();
843 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 844 DEBUG_ASSERT(callee_graph->VerifyUseLists());
844 845
845 // Optimize (a << b) & c patterns, merge instructions. Must occur 846 // Optimize (a << b) & c patterns, merge instructions. Must occur
846 // before 'SelectRepresentations' which inserts conversion nodes. 847 // before 'SelectRepresentations' which inserts conversion nodes.
847 callee_graph->TryOptimizePatterns(); 848 callee_graph->TryOptimizePatterns();
848 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 849 DEBUG_ASSERT(callee_graph->VerifyUseLists());
850 #else
851 UNREACHABLE();
852 #endif // DART_PRECOMPILER
849 } else { 853 } else {
850 JitOptimizer optimizer(callee_graph); 854 JitOptimizer optimizer(callee_graph);
851 855
852 optimizer.ApplyClassIds(); 856 optimizer.ApplyClassIds();
853 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 857 DEBUG_ASSERT(callee_graph->VerifyUseLists());
854 858
855 FlowGraphTypePropagator::Propagate(callee_graph); 859 FlowGraphTypePropagator::Propagate(callee_graph);
856 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 860 DEBUG_ASSERT(callee_graph->VerifyUseLists());
857 861
858 optimizer.ApplyICData(); 862 optimizer.ApplyICData();
(...skipping 2919 matching lines...) Expand 10 before | Expand all | Expand 10 after
3778 return true; 3782 return true;
3779 } 3783 }
3780 3784
3781 default: 3785 default:
3782 return false; 3786 return false;
3783 } 3787 }
3784 } 3788 }
3785 3789
3786 3790
3787 } // namespace dart 3791 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698