OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/redundancy_elimination.h" | 5 #include "vm/redundancy_elimination.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/flow_graph.h" | 8 #include "vm/flow_graph.h" |
9 #include "vm/hash_map.h" | 9 #include "vm/hash_map.h" |
10 #include "vm/il_printer.h" | 10 #include "vm/il_printer.h" |
11 #include "vm/intermediate_language.h" | 11 #include "vm/intermediate_language.h" |
12 #include "vm/stack_frame.h" | 12 #include "vm/stack_frame.h" |
13 | 13 |
14 namespace dart { | 14 namespace dart { |
15 | 15 |
16 | 16 |
17 DEFINE_FLAG(bool, dead_store_elimination, true, "Eliminate dead stores"); | 17 DEFINE_FLAG(bool, dead_store_elimination, true, "Eliminate dead stores"); |
18 DEFINE_FLAG(bool, load_cse, true, "Use redundant load elimination."); | 18 DEFINE_FLAG(bool, load_cse, true, "Use redundant load elimination."); |
19 DEFINE_FLAG(bool, trace_load_optimization, false, | 19 DEFINE_FLAG(bool, trace_load_optimization, false, |
20 "Print live sets for load optimization pass."); | 20 "Print live sets for load optimization pass."); |
21 | 21 |
22 DECLARE_FLAG(bool, fields_may_be_reset); | 22 DECLARE_FLAG(bool, fields_may_be_reset); |
23 DECLARE_FLAG(bool, precompilation); | 23 DECLARE_FLAG(bool, precompilation); |
24 DECLARE_FLAG(bool, trace_optimization); | |
25 | 24 |
26 // Quick access to the current zone. | 25 // Quick access to the current zone. |
27 #define Z (zone()) | 26 #define Z (zone()) |
28 | 27 |
29 | 28 |
30 class CSEInstructionMap : public ValueObject { | 29 class CSEInstructionMap : public ValueObject { |
31 public: | 30 public: |
32 // Right now CSE and LICM track a single effect: possible externalization of | 31 // Right now CSE and LICM track a single effect: possible externalization of |
33 // strings. | 32 // strings. |
34 // Other effects like modifications of fields are tracked in a separate load | 33 // Other effects like modifications of fields are tracked in a separate load |
(...skipping 3427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3462 join->phis_ = NULL; | 3461 join->phis_ = NULL; |
3463 } else { | 3462 } else { |
3464 join->phis_->TruncateTo(to_index); | 3463 join->phis_->TruncateTo(to_index); |
3465 } | 3464 } |
3466 } | 3465 } |
3467 } | 3466 } |
3468 } | 3467 } |
3469 | 3468 |
3470 | 3469 |
3471 } // namespace dart | 3470 } // namespace dart |
OLD | NEW |