OLD | NEW |
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 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 DEBUG_ASSERT(callee_graph->VerifyUseLists()); | 837 DEBUG_ASSERT(callee_graph->VerifyUseLists()); |
838 | 838 |
839 FlowGraphTypePropagator::Propagate(callee_graph); | 839 FlowGraphTypePropagator::Propagate(callee_graph); |
840 DEBUG_ASSERT(callee_graph->VerifyUseLists()); | 840 DEBUG_ASSERT(callee_graph->VerifyUseLists()); |
841 | 841 |
842 optimizer.ApplyICData(); | 842 optimizer.ApplyICData(); |
843 DEBUG_ASSERT(callee_graph->VerifyUseLists()); | 843 DEBUG_ASSERT(callee_graph->VerifyUseLists()); |
844 | 844 |
845 // Optimize (a << b) & c patterns, merge instructions. Must occur | 845 // Optimize (a << b) & c patterns, merge instructions. Must occur |
846 // before 'SelectRepresentations' which inserts conversion nodes. | 846 // before 'SelectRepresentations' which inserts conversion nodes. |
847 optimizer.TryOptimizePatterns(); | 847 callee_graph->TryOptimizePatterns(); |
848 DEBUG_ASSERT(callee_graph->VerifyUseLists()); | 848 DEBUG_ASSERT(callee_graph->VerifyUseLists()); |
849 } else { | 849 } else { |
850 JitOptimizer optimizer(callee_graph); | 850 JitOptimizer optimizer(callee_graph); |
851 | 851 |
852 optimizer.ApplyClassIds(); | 852 optimizer.ApplyClassIds(); |
853 DEBUG_ASSERT(callee_graph->VerifyUseLists()); | 853 DEBUG_ASSERT(callee_graph->VerifyUseLists()); |
854 | 854 |
855 FlowGraphTypePropagator::Propagate(callee_graph); | 855 FlowGraphTypePropagator::Propagate(callee_graph); |
856 DEBUG_ASSERT(callee_graph->VerifyUseLists()); | 856 DEBUG_ASSERT(callee_graph->VerifyUseLists()); |
857 | 857 |
858 optimizer.ApplyICData(); | 858 optimizer.ApplyICData(); |
859 DEBUG_ASSERT(callee_graph->VerifyUseLists()); | 859 DEBUG_ASSERT(callee_graph->VerifyUseLists()); |
860 | 860 |
861 // Optimize (a << b) & c patterns, merge instructions. Must occur | 861 // Optimize (a << b) & c patterns, merge instructions. Must occur |
862 // before 'SelectRepresentations' which inserts conversion nodes. | 862 // before 'SelectRepresentations' which inserts conversion nodes. |
863 optimizer.TryOptimizePatterns(); | 863 callee_graph->TryOptimizePatterns(); |
864 DEBUG_ASSERT(callee_graph->VerifyUseLists()); | 864 DEBUG_ASSERT(callee_graph->VerifyUseLists()); |
865 } | 865 } |
866 } | 866 } |
867 | 867 |
868 if (FLAG_support_il_printer && trace_inlining() && | 868 if (FLAG_support_il_printer && trace_inlining() && |
869 (FLAG_print_flow_graph || FLAG_print_flow_graph_optimized)) { | 869 (FLAG_print_flow_graph || FLAG_print_flow_graph_optimized)) { |
870 THR_Print("Callee graph for inlining %s\n", | 870 THR_Print("Callee graph for inlining %s\n", |
871 function.ToFullyQualifiedCString()); | 871 function.ToFullyQualifiedCString()); |
872 FlowGraphPrinter printer(*callee_graph); | 872 FlowGraphPrinter printer(*callee_graph); |
873 printer.PrintBlocks(); | 873 printer.PrintBlocks(); |
(...skipping 2779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3653 case MethodRecognizer::kInt32x4FromFloat32x4Bits: | 3653 case MethodRecognizer::kInt32x4FromFloat32x4Bits: |
3654 return InlineSimdConstructor(flow_graph, call, kind, entry, last); | 3654 return InlineSimdConstructor(flow_graph, call, kind, entry, last); |
3655 | 3655 |
3656 default: | 3656 default: |
3657 return false; | 3657 return false; |
3658 } | 3658 } |
3659 } | 3659 } |
3660 | 3660 |
3661 | 3661 |
3662 } // namespace dart | 3662 } // namespace dart |
OLD | NEW |