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

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

Issue 79653002: Merge TRUNCDIV and MOD into one instruction. Icorporated feedback from CL https://codereview.chromi… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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
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/block_scheduler.h" 7 #include "vm/block_scheduler.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 } 561 }
562 562
563 { 563 {
564 TimerScope timer(FLAG_compiler_stats, 564 TimerScope timer(FLAG_compiler_stats,
565 &CompilerStats::graphinliner_opt_timer, 565 &CompilerStats::graphinliner_opt_timer,
566 isolate); 566 isolate);
567 // TODO(zerny): Do more optimization passes on the callee graph. 567 // TODO(zerny): Do more optimization passes on the callee graph.
568 FlowGraphOptimizer optimizer(callee_graph); 568 FlowGraphOptimizer optimizer(callee_graph);
569 optimizer.ApplyICData(); 569 optimizer.ApplyICData();
570 DEBUG_ASSERT(callee_graph->VerifyUseLists()); 570 DEBUG_ASSERT(callee_graph->VerifyUseLists());
571
572 // Optimize (a << b) & c patterns, merge instructions. Must occur before
573 // 'SelectRepresentations' which inserts conversion nodes.
574 optimizer.TryOptimizePatterns();
575 DEBUG_ASSERT(callee_graph->VerifyUseLists());
571 } 576 }
572 577
573 if (FLAG_trace_inlining && 578 if (FLAG_trace_inlining &&
574 (FLAG_print_flow_graph || FLAG_print_flow_graph_optimized)) { 579 (FLAG_print_flow_graph || FLAG_print_flow_graph_optimized)) {
575 OS::Print("Callee graph for inlining %s\n", 580 OS::Print("Callee graph for inlining %s\n",
576 function.ToFullyQualifiedCString()); 581 function.ToFullyQualifiedCString());
577 FlowGraphPrinter printer(*callee_graph); 582 FlowGraphPrinter printer(*callee_graph);
578 printer.PrintBlocks(); 583 printer.PrintBlocks();
579 } 584 }
580 585
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 OS::Print("After Inlining of %s\n", flow_graph_-> 1473 OS::Print("After Inlining of %s\n", flow_graph_->
1469 parsed_function().function().ToFullyQualifiedCString()); 1474 parsed_function().function().ToFullyQualifiedCString());
1470 FlowGraphPrinter printer(*flow_graph_); 1475 FlowGraphPrinter printer(*flow_graph_);
1471 printer.PrintBlocks(); 1476 printer.PrintBlocks();
1472 } 1477 }
1473 } 1478 }
1474 } 1479 }
1475 } 1480 }
1476 1481
1477 } // namespace dart 1482 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698