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

Unified Diff: src/compiler/state-values-utils.h

Issue 2509623002: [turbofan] Sparse representation for state values (Closed)
Patch Set: Remove the optimized_out input entirely, return nullptr when iterating Created 4 years, 1 month 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
Index: src/compiler/state-values-utils.h
diff --git a/src/compiler/state-values-utils.h b/src/compiler/state-values-utils.h
index 14b1b9e59963755c2b0e543becb3c46f3220e994..dc643137e050bed90e4188e06e36f542517443d8 100644
--- a/src/compiler/state-values-utils.h
+++ b/src/compiler/state-values-utils.h
@@ -33,10 +33,11 @@ class V8_EXPORT_PRIVATE StateValuesCache {
struct StateValuesKey : public NodeKey {
// ValueArray - array of nodes ({node} has to be nullptr).
size_t count;
+ uint32_t mask;
Node** values;
- StateValuesKey(size_t count, Node** values)
- : NodeKey(nullptr), count(count), values(values) {}
+ StateValuesKey(size_t count, uint32_t mask, Node** values)
+ : NodeKey(nullptr), count(count), mask(mask), values(values) {}
};
class ValueArrayIterator;
@@ -48,7 +49,7 @@ class V8_EXPORT_PRIVATE StateValuesCache {
Node* BuildTree(ValueArrayIterator* it, size_t max_height);
NodeVector* GetWorkingSpace(size_t level);
Node* GetEmptyStateValues();
- Node* GetValuesNodeFromCache(Node** nodes, size_t count);
+ Node* GetValuesNodeFromCache(Node** nodes, size_t count, uint32_t mask);
Graph* graph() { return js_graph_->graph(); }
CommonOperatorBuilder* common() { return js_graph_->common(); }
@@ -86,17 +87,17 @@ class V8_EXPORT_PRIVATE StateValuesAccess {
MachineType type();
bool done();
void Advance();
+ void MoveToNextSibling();
+ void EnsureValid();
struct StatePos {
Node* node;
+ uint32_t mask;
int index;
-
- explicit StatePos(Node* node) : node(node), index(0) {}
- StatePos() {}
};
StatePos* Top();
- void Push(Node* node);
+ void Push(Node* node, uint32_t mask);
void Pop();
static const int kMaxInlineDepth = 8;

Powered by Google App Engine
This is Rietveld 408576698