Chromium Code Reviews| 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); |
| }; |