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

Unified Diff: src/compiler/escape-analysis.h

Issue 1510973006: Stabilize escape analysis (without deopt) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fix-guard-bug
Patch Set: Rebase Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/escape-analysis.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/escape-analysis.h
diff --git a/src/compiler/escape-analysis.h b/src/compiler/escape-analysis.h
index 9a91d1a07a6b3a017462e5586e5a9d97247421da..1ba86da6a48614cc4ad08ca25889da664463e0ba 100644
--- a/src/compiler/escape-analysis.h
+++ b/src/compiler/escape-analysis.h
@@ -35,6 +35,7 @@ class EscapeStatusAnalysis {
bool IsVirtual(Node* node);
bool IsEscaped(Node* node);
+ bool IsAllocation(Node* node);
void DebugPrint();
@@ -73,6 +74,30 @@ class EscapeStatusAnalysis {
DEFINE_OPERATORS_FOR_FLAGS(EscapeStatusAnalysis::EscapeStatusFlags)
+class MergeCache {
+ public:
+ explicit MergeCache(Zone* zone)
+ : states_(zone), objects_(zone), fields_(zone) {
+ states_.reserve(4);
+ objects_.reserve(4);
+ fields_.reserve(4);
+ }
+ ZoneVector<VirtualState*>& states() { return states_; }
+ ZoneVector<VirtualObject*>& objects() { return objects_; }
+ ZoneVector<Node*>& fields() { return fields_; }
+ void Clear() {
+ states_.clear();
+ objects_.clear();
+ fields_.clear();
+ }
+
+ private:
+ ZoneVector<VirtualState*> states_;
+ ZoneVector<VirtualObject*> objects_;
+ ZoneVector<Node*> fields_;
+};
+
+
// EscapeObjectAnalysis simulates stores to determine values of loads if
// an object is virtual and eliminated.
class EscapeAnalysis {
@@ -110,6 +135,8 @@ class EscapeAnalysis {
VirtualObject* GetVirtualObject(Node* at, NodeId id);
+ bool SetEscaped(Node* node);
+
void DebugPrint();
void DebugPrintState(VirtualState* state);
void DebugPrintObject(VirtualObject* state, NodeId id);
@@ -123,6 +150,7 @@ class EscapeAnalysis {
Zone* const zone_;
ZoneVector<VirtualState*> virtual_states_;
EscapeStatusAnalysis escape_status_;
+ MergeCache cache_;
DISALLOW_COPY_AND_ASSIGN(EscapeAnalysis);
};
« 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