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

Unified Diff: src/compiler/bytecode-liveness-map.h

Issue 2523893003: Reland of [ignition/turbo] Perform liveness analysis on the bytecodes (Closed)
Patch Set: Export handler table for tests 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
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/bytecode-liveness-map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-liveness-map.h
diff --git a/src/compiler/bytecode-liveness-map.h b/src/compiler/bytecode-liveness-map.h
new file mode 100644
index 0000000000000000000000000000000000000000..e5c7a38996539d388d062f73caf890d085159cb2
--- /dev/null
+++ b/src/compiler/bytecode-liveness-map.h
@@ -0,0 +1,55 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_BYTECODE_LIVENESS_MAP_H_
+#define V8_COMPILER_BYTECODE_LIVENESS_MAP_H_
+
+#include "src/base/hashmap.h"
+#include "src/bit-vector.h"
+#include "src/zone/zone.h"
+
+namespace v8 {
+namespace internal {
+
+class Zone;
+
+namespace compiler {
+
+struct Liveness {
+ BitVector* in;
+ BitVector* out;
+
+ Liveness(int size, Zone* zone);
+};
+
+class V8_EXPORT_PRIVATE BytecodeLivenessMap {
+ public:
+ BytecodeLivenessMap(int size, Zone* zone);
+
+ Liveness& InitializeLiveness(int offset, int size, Zone* zone);
+
+ Liveness& GetLiveness(int offset);
+ const Liveness& GetLiveness(int offset) const;
+
+ BitVector* GetInLiveness(int offset) { return GetLiveness(offset).in; }
+ const BitVector* GetInLiveness(int offset) const {
+ return GetLiveness(offset).in;
+ }
+
+ BitVector* GetOutLiveness(int offset) { return GetLiveness(offset).out; }
+ const BitVector* GetOutLiveness(int offset) const {
+ return GetLiveness(offset).out;
+ }
+
+ private:
+ base::TemplateHashMapImpl<int, Liveness, base::KeyEqualityMatcher<int>,
+ ZoneAllocationPolicy>
+ liveness_map_;
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_COMPILER_BYTECODE_LIVENESS_MAP_H_
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/bytecode-liveness-map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698