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

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

Issue 2074533002: Simplify and improve optimization of is-tests in the precompiler. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 optimizer.ApplyICData(); 856 optimizer.ApplyICData();
857 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 857 DEBUG_ASSERT(callee_graph->VerifyUseLists());
858 858
859 // Optimize (a << b) & c patterns, merge instructions. Must occur 859 // Optimize (a << b) & c patterns, merge instructions. Must occur
860 // before 'SelectRepresentations' which inserts conversion nodes. 860 // before 'SelectRepresentations' which inserts conversion nodes.
861 optimizer.TryOptimizePatterns(); 861 optimizer.TryOptimizePatterns();
862 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 862 DEBUG_ASSERT(callee_graph->VerifyUseLists());
863 } 863 }
864 } 864 }
865 865
866 if (FLAG_support_il_printer && FLAG_trace_inlining && 866 if (FLAG_support_il_printer && trace_inlining() &&
867 (FLAG_print_flow_graph || FLAG_print_flow_graph_optimized)) { 867 (FLAG_print_flow_graph || FLAG_print_flow_graph_optimized)) {
868 THR_Print("Callee graph for inlining %s\n", 868 THR_Print("Callee graph for inlining %s\n",
869 function.ToFullyQualifiedCString()); 869 function.ToFullyQualifiedCString());
870 FlowGraphPrinter printer(*callee_graph); 870 FlowGraphPrinter printer(*callee_graph);
871 printer.PrintBlocks(); 871 printer.PrintBlocks();
872 } 872 }
873 873
874 // Collect information about the call site and caller graph. 874 // Collect information about the call site and caller graph.
875 // TODO(zerny): Do this after CP and dead code elimination. 875 // TODO(zerny): Do this after CP and dead code elimination.
876 intptr_t constants_count = 0; 876 intptr_t constants_count = 0;
(...skipping 2256 matching lines...) Expand 10 before | Expand all | Expand 10 after
3133 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last); 3133 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last);
3134 case MethodRecognizer::kDoubleDiv: 3134 case MethodRecognizer::kDoubleDiv:
3135 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last); 3135 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last);
3136 default: 3136 default:
3137 return false; 3137 return false;
3138 } 3138 }
3139 } 3139 }
3140 3140
3141 3141
3142 } // namespace dart 3142 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698