| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/compiler.h" | 5 #include "vm/compiler.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 | 8 |
| 9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
| 10 #include "vm/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 flow_graph->Canonicalize(); | 935 flow_graph->Canonicalize(); |
| 936 } | 936 } |
| 937 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 937 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 938 } | 938 } |
| 939 } | 939 } |
| 940 | 940 |
| 941 // Run loop-invariant code motion right after load elimination since | 941 // Run loop-invariant code motion right after load elimination since |
| 942 // it depends on the numbering of loads from the previous | 942 // it depends on the numbering of loads from the previous |
| 943 // load-elimination. | 943 // load-elimination. |
| 944 if (FLAG_loop_invariant_code_motion) { | 944 if (FLAG_loop_invariant_code_motion) { |
| 945 flow_graph->RenameUsesDominatedByRedefinitions(); |
| 946 DEBUG_ASSERT(flow_graph->VerifyRedefinitions()); |
| 945 LICM licm(flow_graph); | 947 LICM licm(flow_graph); |
| 946 licm.Optimize(); | 948 licm.Optimize(); |
| 947 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 949 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 948 } | 950 } |
| 949 flow_graph->RemoveRedefinitions(); | 951 flow_graph->RemoveRedefinitions(); |
| 950 } | 952 } |
| 951 | 953 |
| 952 // Optimize (a << b) & c patterns, merge operations. | 954 // Optimize (a << b) & c patterns, merge operations. |
| 953 // Run after CSE in order to have more opportunity to merge | 955 // Run after CSE in order to have more opportunity to merge |
| 954 // instructions that have same inputs. | 956 // instructions that have same inputs. |
| (...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2265 | 2267 |
| 2266 | 2268 |
| 2267 bool BackgroundCompiler::IsDisabled() { | 2269 bool BackgroundCompiler::IsDisabled() { |
| 2268 UNREACHABLE(); | 2270 UNREACHABLE(); |
| 2269 return true; | 2271 return true; |
| 2270 } | 2272 } |
| 2271 | 2273 |
| 2272 #endif // DART_PRECOMPILED_RUNTIME | 2274 #endif // DART_PRECOMPILED_RUNTIME |
| 2273 | 2275 |
| 2274 } // namespace dart | 2276 } // namespace dart |
| OLD | NEW |