summaryrefslogtreecommitdiff
path: root/compiler/optimizing/stack_map_stream.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2017-02-01 22:53:59 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-02-01 22:54:00 +0000
commit3cb871ab1af47576959fd24a99d370381b8f193e (patch)
tree6e95b08b6fcf253ab6ea53d2e542e3f85f9f39c7 /compiler/optimizing/stack_map_stream.h
parent9fcd2566c3893a9497aa713330bd231b3157d17e (diff)
parent1a20b6801f2432a42b906f0de01e7e9586526aec (diff)
Merge "Deduplicate register masks"
Diffstat (limited to 'compiler/optimizing/stack_map_stream.h')
-rw-r--r--compiler/optimizing/stack_map_stream.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h
index e2e16e8203..b1069a17be 100644
--- a/compiler/optimizing/stack_map_stream.h
+++ b/compiler/optimizing/stack_map_stream.h
@@ -69,6 +69,7 @@ class StackMapStream : public ValueObject {
dex_register_locations_(allocator->Adapter(kArenaAllocStackMapStream)),
inline_infos_(allocator->Adapter(kArenaAllocStackMapStream)),
stack_masks_(allocator->Adapter(kArenaAllocStackMapStream)),
+ register_masks_(allocator->Adapter(kArenaAllocStackMapStream)),
stack_mask_max_(-1),
dex_pc_max_(0),
register_mask_max_(0),
@@ -109,6 +110,7 @@ class StackMapStream : public ValueObject {
uint32_t dex_register_map_hash;
size_t same_dex_register_map_as_;
uint32_t stack_mask_index;
+ uint32_t register_mask_index;
};
struct InlineInfoEntry {
@@ -165,6 +167,9 @@ class StackMapStream : public ValueObject {
// Returns the number of unique stack masks.
size_t PrepareStackMasks(size_t entry_size_in_bits);
+ // Returns the number of unique register masks.
+ size_t PrepareRegisterMasks();
+
// Returns the index of an entry with the same dex register map as the current_entry,
// or kNoSameDexMapFound if no such entry exists.
size_t FindEntryWithTheSameDexMap();
@@ -199,6 +204,7 @@ class StackMapStream : public ValueObject {
ArenaVector<size_t> dex_register_locations_;
ArenaVector<InlineInfoEntry> inline_infos_;
ArenaVector<uint8_t> stack_masks_;
+ ArenaVector<uint32_t> register_masks_;
int stack_mask_max_;
uint32_t dex_pc_max_;
uint32_t register_mask_max_;