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

Unified Diff: src/compiler/all-nodes.h

Issue 940403002: [turbofan] Don't compute unneeded gray set in AllNodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/all-nodes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/all-nodes.h
diff --git a/src/compiler/all-nodes.h b/src/compiler/all-nodes.h
index e6a83ef623761e57da41daa2a7dd65d46a2ad3ac..700f0071b1e531e5514a121554a984cdcba3924d 100644
--- a/src/compiler/all-nodes.h
+++ b/src/compiler/all-nodes.h
@@ -5,7 +5,6 @@
#ifndef V8_COMPILER_ALL_NODES_H_
#define V8_COMPILER_ALL_NODES_H_
-#include "src/compiler/graph.h"
#include "src/compiler/node.h"
#include "src/zone-containers.h"
@@ -17,25 +16,23 @@ namespace compiler {
// from end.
class AllNodes {
public:
- // Constructor. Traverses the graph and builds the {live} and {gray} sets.
+ // Constructor. Traverses the graph and builds the {live} sets.
AllNodes(Zone* local_zone, const Graph* graph);
bool IsLive(Node* node) {
- return node != nullptr && node->id() < static_cast<int>(state.size()) &&
- state[node->id()] == kLive;
+ if (!node) return false;
+ size_t id = node->id();
+ return id < is_live.size() && is_live[id];
}
NodeVector live; // Nodes reachable from end.
- NodeVector gray; // Nodes themselves not reachable from end, but that
- // appear in use lists of live nodes.
private:
- enum State { kDead, kGray, kLive };
-
- ZoneVector<State> state;
+ BoolVector is_live;
};
-}
-}
-} // namespace v8::internal::compiler
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
#endif // V8_COMPILER_ALL_NODES_H_
« no previous file with comments | « no previous file | src/compiler/all-nodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698