Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: src/compiler/escape-analysis.h

Issue 1659503002: [turbofan] Improve some heuristics in escape analysis (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Maybe this works on w64, too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/escape-analysis.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 Graph* graph() const { return graph_; } 66 Graph* graph() const { return graph_; }
67 Zone* zone() const { return zone_; } 67 Zone* zone() const { return zone_; }
68 void AssignAliases(); 68 void AssignAliases();
69 Alias GetAlias(NodeId id) const { return aliases_[id]; } 69 Alias GetAlias(NodeId id) const { return aliases_[id]; }
70 const ZoneVector<Alias>& GetAliasMap() const { return aliases_; } 70 const ZoneVector<Alias>& GetAliasMap() const { return aliases_; }
71 Alias AliasCount() const { return next_free_alias_; } 71 Alias AliasCount() const { return next_free_alias_; }
72 static const Alias kNotReachable; 72 static const Alias kNotReachable;
73 static const Alias kUntrackable; 73 static const Alias kUntrackable;
74 74
75 bool IsNotReachable(Node* node); 75 bool IsNotReachable(Node* node);
76 ZoneVector<Node*>& stack() { return stack_; }
77 76
78 private: 77 private:
79 void Process(Node* node); 78 void Process(Node* node);
80 void ProcessAllocate(Node* node); 79 void ProcessAllocate(Node* node);
81 void ProcessFinishRegion(Node* node); 80 void ProcessFinishRegion(Node* node);
82 void ProcessStoreField(Node* node); 81 void ProcessStoreField(Node* node);
83 void ProcessStoreElement(Node* node); 82 void ProcessStoreElement(Node* node);
84 bool CheckUsesForEscape(Node* node, bool phi_escaping = false) { 83 bool CheckUsesForEscape(Node* node, bool phi_escaping = false) {
85 return CheckUsesForEscape(node, node, phi_escaping); 84 return CheckUsesForEscape(node, node, phi_escaping);
86 } 85 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 162
164 VirtualObject* GetVirtualObject(VirtualState* state, Node* node); 163 VirtualObject* GetVirtualObject(VirtualState* state, Node* node);
165 164
166 void DebugPrint(); 165 void DebugPrint();
167 void DebugPrintState(VirtualState* state); 166 void DebugPrintState(VirtualState* state);
168 void DebugPrintObject(VirtualObject* state, Alias id); 167 void DebugPrintObject(VirtualObject* state, Alias id);
169 168
170 Graph* graph() const { return status_analysis_.graph(); } 169 Graph* graph() const { return status_analysis_.graph(); }
171 Zone* zone() const { return status_analysis_.zone(); } 170 Zone* zone() const { return status_analysis_.zone(); }
172 CommonOperatorBuilder* common() const { return common_; } 171 CommonOperatorBuilder* common() const { return common_; }
173 ZoneVector<Node*>& stack() { return status_analysis_.stack(); }
174 bool IsEffectBranchPoint(Node* node) { 172 bool IsEffectBranchPoint(Node* node) {
175 return status_analysis_.IsEffectBranchPoint(node); 173 return status_analysis_.IsEffectBranchPoint(node);
176 } 174 }
177 bool IsDanglingEffectNode(Node* node) { 175 bool IsDanglingEffectNode(Node* node) {
178 return status_analysis_.IsDanglingEffectNode(node); 176 return status_analysis_.IsDanglingEffectNode(node);
179 } 177 }
180 bool IsNotReachable(Node* node) { 178 bool IsNotReachable(Node* node) {
181 return status_analysis_.IsNotReachable(node); 179 return status_analysis_.IsNotReachable(node);
182 } 180 }
183 Alias GetAlias(NodeId id) const { return status_analysis_.GetAlias(id); } 181 Alias GetAlias(NodeId id) const { return status_analysis_.GetAlias(id); }
184 Alias AliasCount() const { return status_analysis_.AliasCount(); } 182 Alias AliasCount() const { return status_analysis_.AliasCount(); }
185 183
186 EscapeStatusAnalysis status_analysis_; 184 EscapeStatusAnalysis status_analysis_;
187 CommonOperatorBuilder* const common_; 185 CommonOperatorBuilder* const common_;
188 ZoneVector<VirtualState*> virtual_states_; 186 ZoneVector<VirtualState*> virtual_states_;
189 ZoneVector<Node*> replacements_; 187 ZoneVector<Node*> replacements_;
190 MergeCache* cache_; 188 MergeCache* cache_;
191 189
192 DISALLOW_COPY_AND_ASSIGN(EscapeAnalysis); 190 DISALLOW_COPY_AND_ASSIGN(EscapeAnalysis);
193 }; 191 };
194 192
195 } // namespace compiler 193 } // namespace compiler
196 } // namespace internal 194 } // namespace internal
197 } // namespace v8 195 } // namespace v8
198 196
199 #endif // V8_COMPILER_ESCAPE_ANALYSIS_H_ 197 #endif // V8_COMPILER_ESCAPE_ANALYSIS_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/escape-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698