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

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

Issue 2523893003: Reland of [ignition/turbo] Perform liveness analysis on the bytecodes (Closed)
Patch Set: 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 | « no previous file | src/compiler/bytecode-analysis.cc » ('j') | src/compiler/bytecode-analysis.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-analysis.h
diff --git a/src/compiler/bytecode-analysis.h b/src/compiler/bytecode-analysis.h
index f50b00f2c696ecd0acf07ef2d8c7276267555df4..ded11d402147116b6237cbbb50df4d4618bb57c9 100644
--- a/src/compiler/bytecode-analysis.h
+++ b/src/compiler/bytecode-analysis.h
@@ -5,6 +5,8 @@
#ifndef V8_COMPILER_BYTECODE_ANALYSIS_H_
#define V8_COMPILER_BYTECODE_ANALYSIS_H_
+#include "src/base/hashmap.h"
+#include "src/bit-vector.h"
#include "src/handles.h"
#include "src/zone/zone-containers.h"
@@ -32,6 +34,21 @@ class BytecodeAnalysis BASE_EMBEDDED {
// at {header_offset}, or -1 for outer-most loops.
int GetParentLoopFor(int header_offset) const;
+ const BitVector* GetInLivenessFor(int offset) const;
+
+ const BitVector* GetOutLivenessFor(int offset) const;
+
+ struct Liveness {
+ BitVector* in;
+ BitVector* out;
+
+ Liveness(int size, Zone* zone);
+ };
+
+ typedef base::TemplateHashMapImpl<
+ int, Liveness, base::KeyEqualityMatcher<int>, ZoneAllocationPolicy>
+ LivenessMap;
Jarin 2016/11/24 12:47:17 Does this offer significant advantage over std::un
Leszek Swirski 2016/11/25 17:31:27 I haven't measured here, but I've measured advanta
+
private:
void PushLoop(int loop_header, int loop_end);
@@ -46,6 +63,8 @@ class BytecodeAnalysis BASE_EMBEDDED {
ZoneMap<int, int> end_to_header_;
ZoneMap<int, int> header_to_parent_;
+ LivenessMap liveness_;
+
DISALLOW_COPY_AND_ASSIGN(BytecodeAnalysis);
};
« no previous file with comments | « no previous file | src/compiler/bytecode-analysis.cc » ('j') | src/compiler/bytecode-analysis.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698