| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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/precompiler.h" | 5 #include "vm/precompiler.h" |
| 6 | 6 |
| 7 #include "vm/aot_optimizer.h" | 7 #include "vm/aot_optimizer.h" |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
| 10 #include "vm/branch_optimizer.h" | 10 #include "vm/branch_optimizer.h" |
| (...skipping 2656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2667 compiler_timeline, | 2667 compiler_timeline, |
| 2668 "AllocationSinking::DetachMaterializations"); | 2668 "AllocationSinking::DetachMaterializations"); |
| 2669 #endif // !PRODUCT | 2669 #endif // !PRODUCT |
| 2670 // Remove all MaterializeObject instructions inserted by allocation | 2670 // Remove all MaterializeObject instructions inserted by allocation |
| 2671 // sinking from the flow graph and let them float on the side | 2671 // sinking from the flow graph and let them float on the side |
| 2672 // referenced only from environments. Register allocator will consider | 2672 // referenced only from environments. Register allocator will consider |
| 2673 // them as part of a deoptimization environment. | 2673 // them as part of a deoptimization environment. |
| 2674 sinking->DetachMaterializations(); | 2674 sinking->DetachMaterializations(); |
| 2675 } | 2675 } |
| 2676 | 2676 |
| 2677 // Replace bounds check instruction with a generic one. | |
| 2678 optimizer.ReplaceArrayBoundChecks(); | |
| 2679 | |
| 2680 // Compute and store graph informations (call & instruction counts) | 2677 // Compute and store graph informations (call & instruction counts) |
| 2681 // to be later used by the inliner. | 2678 // to be later used by the inliner. |
| 2682 FlowGraphInliner::CollectGraphInfo(flow_graph, true); | 2679 FlowGraphInliner::CollectGraphInfo(flow_graph, true); |
| 2683 | 2680 |
| 2684 { | 2681 { |
| 2685 #ifndef PRODUCT | 2682 #ifndef PRODUCT |
| 2686 TimelineDurationScope tds2(thread(), | 2683 TimelineDurationScope tds2(thread(), |
| 2687 compiler_timeline, | 2684 compiler_timeline, |
| 2688 "AllocateRegisters"); | 2685 "AllocateRegisters"); |
| 2689 #endif // !PRODUCT | 2686 #endif // !PRODUCT |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2883 CompilationPipeline::New(thread->zone(), function); | 2880 CompilationPipeline::New(thread->zone(), function); |
| 2884 | 2881 |
| 2885 ASSERT(FLAG_precompiled_mode); | 2882 ASSERT(FLAG_precompiled_mode); |
| 2886 const bool optimized = function.IsOptimizable(); // False for natives. | 2883 const bool optimized = function.IsOptimizable(); // False for natives. |
| 2887 return PrecompileFunctionHelper(pipeline, function, optimized); | 2884 return PrecompileFunctionHelper(pipeline, function, optimized); |
| 2888 } | 2885 } |
| 2889 | 2886 |
| 2890 #endif // DART_PRECOMPILER | 2887 #endif // DART_PRECOMPILER |
| 2891 | 2888 |
| 2892 } // namespace dart | 2889 } // namespace dart |
| OLD | NEW |