OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_ESCAPE_ANALYSIS_H_ | 5 #ifndef V8_COMPILER_ESCAPE_ANALYSIS_H_ |
6 #define V8_COMPILER_ESCAPE_ANALYSIS_H_ | 6 #define V8_COMPILER_ESCAPE_ANALYSIS_H_ |
7 | 7 |
8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
9 #include "src/compiler/graph.h" | 9 #include "src/compiler/graph.h" |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 void ProcessFinishRegion(Node* node); | 51 void ProcessFinishRegion(Node* node); |
52 void ProcessStoreField(Node* node); | 52 void ProcessStoreField(Node* node); |
53 void ProcessStoreElement(Node* node); | 53 void ProcessStoreElement(Node* node); |
54 bool CheckUsesForEscape(Node* node, bool phi_escaping = false) { | 54 bool CheckUsesForEscape(Node* node, bool phi_escaping = false) { |
55 return CheckUsesForEscape(node, node, phi_escaping); | 55 return CheckUsesForEscape(node, node, phi_escaping); |
56 } | 56 } |
57 bool CheckUsesForEscape(Node* node, Node* rep, bool phi_escaping = false); | 57 bool CheckUsesForEscape(Node* node, Node* rep, bool phi_escaping = false); |
58 void RevisitUses(Node* node); | 58 void RevisitUses(Node* node); |
59 void RevisitInputs(Node* node); | 59 void RevisitInputs(Node* node); |
60 bool SetEscaped(Node* node); | 60 bool SetEscaped(Node* node); |
| 61 bool IsVirtual(NodeId id); |
61 bool HasEntry(Node* node); | 62 bool HasEntry(Node* node); |
62 void Resize(); | 63 void Resize(); |
63 size_t size(); | 64 size_t size(); |
64 bool IsAllocationPhi(Node* node); | 65 bool IsAllocationPhi(Node* node); |
65 | 66 |
66 Graph* graph() const { return graph_; } | 67 Graph* graph() const { return graph_; } |
67 Zone* zone() const { return zone_; } | 68 Zone* zone() const { return zone_; } |
68 | 69 |
69 EscapeAnalysis* object_analysis_; | 70 EscapeAnalysis* object_analysis_; |
70 Graph* const graph_; | 71 Graph* const graph_; |
(...skipping 21 matching lines...) Expand all Loading... |
92 EscapeAnalysis(Graph* graph, CommonOperatorBuilder* common, Zone* zone); | 93 EscapeAnalysis(Graph* graph, CommonOperatorBuilder* common, Zone* zone); |
93 ~EscapeAnalysis(); | 94 ~EscapeAnalysis(); |
94 | 95 |
95 void Run(); | 96 void Run(); |
96 | 97 |
97 Node* GetReplacement(Node* node); | 98 Node* GetReplacement(Node* node); |
98 bool IsVirtual(Node* node); | 99 bool IsVirtual(Node* node); |
99 bool IsEscaped(Node* node); | 100 bool IsEscaped(Node* node); |
100 bool CompareVirtualObjects(Node* left, Node* right); | 101 bool CompareVirtualObjects(Node* left, Node* right); |
101 Node* GetOrCreateObjectState(Node* effect, Node* node); | 102 Node* GetOrCreateObjectState(Node* effect, Node* node); |
| 103 bool ExistsVirtualAllocate(); |
102 | 104 |
103 private: | 105 private: |
104 void RunObjectAnalysis(); | 106 void RunObjectAnalysis(); |
105 void AssignAliases(); | 107 void AssignAliases(); |
106 bool Process(Node* node); | 108 bool Process(Node* node); |
107 void ProcessLoadField(Node* node); | 109 void ProcessLoadField(Node* node); |
108 void ProcessStoreField(Node* node); | 110 void ProcessStoreField(Node* node); |
109 void ProcessLoadElement(Node* node); | 111 void ProcessLoadElement(Node* node); |
110 void ProcessStoreElement(Node* node); | 112 void ProcessStoreElement(Node* node); |
111 void ProcessAllocationUsers(Node* node); | 113 void ProcessAllocationUsers(Node* node); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 Alias next_free_alias_; | 162 Alias next_free_alias_; |
161 | 163 |
162 DISALLOW_COPY_AND_ASSIGN(EscapeAnalysis); | 164 DISALLOW_COPY_AND_ASSIGN(EscapeAnalysis); |
163 }; | 165 }; |
164 | 166 |
165 } // namespace compiler | 167 } // namespace compiler |
166 } // namespace internal | 168 } // namespace internal |
167 } // namespace v8 | 169 } // namespace v8 |
168 | 170 |
169 #endif // V8_COMPILER_ESCAPE_ANALYSIS_H_ | 171 #endif // V8_COMPILER_ESCAPE_ANALYSIS_H_ |
OLD | NEW |