OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_LOAD_ELIMINATION_H_ | 5 #ifndef V8_COMPILER_LOAD_ELIMINATION_H_ |
6 #define V8_COMPILER_LOAD_ELIMINATION_H_ | 6 #define V8_COMPILER_LOAD_ELIMINATION_H_ |
7 | 7 |
| 8 #include "src/base/compiler-specific.h" |
8 #include "src/compiler/graph-reducer.h" | 9 #include "src/compiler/graph-reducer.h" |
| 10 #include "src/globals.h" |
9 | 11 |
10 namespace v8 { | 12 namespace v8 { |
11 namespace internal { | 13 namespace internal { |
12 namespace compiler { | 14 namespace compiler { |
13 | 15 |
14 // Foward declarations. | 16 // Foward declarations. |
15 class CommonOperatorBuilder; | 17 class CommonOperatorBuilder; |
16 struct FieldAccess; | 18 struct FieldAccess; |
17 class Graph; | 19 class Graph; |
18 class JSGraph; | 20 class JSGraph; |
19 | 21 |
20 class LoadElimination final : public AdvancedReducer { | 22 class V8_EXPORT_PRIVATE LoadElimination final |
| 23 : public NON_EXPORTED_BASE(AdvancedReducer) { |
21 public: | 24 public: |
22 LoadElimination(Editor* editor, JSGraph* jsgraph, Zone* zone) | 25 LoadElimination(Editor* editor, JSGraph* jsgraph, Zone* zone) |
23 : AdvancedReducer(editor), node_states_(zone), jsgraph_(jsgraph) {} | 26 : AdvancedReducer(editor), node_states_(zone), jsgraph_(jsgraph) {} |
24 ~LoadElimination() final {} | 27 ~LoadElimination() final {} |
25 | 28 |
26 Reduction Reduce(Node* node) final; | 29 Reduction Reduce(Node* node) final; |
27 | 30 |
28 private: | 31 private: |
29 static const size_t kMaxTrackedChecks = 8; | 32 static const size_t kMaxTrackedChecks = 8; |
30 | 33 |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 JSGraph* const jsgraph_; | 231 JSGraph* const jsgraph_; |
229 | 232 |
230 DISALLOW_COPY_AND_ASSIGN(LoadElimination); | 233 DISALLOW_COPY_AND_ASSIGN(LoadElimination); |
231 }; | 234 }; |
232 | 235 |
233 } // namespace compiler | 236 } // namespace compiler |
234 } // namespace internal | 237 } // namespace internal |
235 } // namespace v8 | 238 } // namespace v8 |
236 | 239 |
237 #endif // V8_COMPILER_LOAD_ELIMINATION_H_ | 240 #endif // V8_COMPILER_LOAD_ELIMINATION_H_ |
OLD | NEW |