From 4b59d107f91601c4e0095d7a9db40970d4ed6956 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Tue, 29 May 2018 21:46:10 +0000 Subject: Revert^2 "Optimize register mask and stack mask in stack maps." This reverts commit 8b20b5c1f5b454b2f8b8bff492c88724b5002600. Reason for revert: Retry submit unmodified after fixing the test. Use BitTable to store the masks as well and move the deduplication responsibility to the BitTable builders. Don't generate entries for masks which are all zeros. This saves 0.2% of .oat file size on both Arm64 and Arm. Encode registers as (value+shift) due to tailing zeros. This saves 1.0% of .oat file size on Arm64 and 0.2% on Arm. Test: test-art-target-gtest-exception_test Test: test-art-host-gtest-bit_table_test Test: test-art-host-gtest-stack_map_test Change-Id: Ib643776dbec3f051cc29cd13ff39e453fab5fae9 --- compiler/optimizing/stack_map_stream.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'compiler/optimizing/stack_map_stream.h') diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h index ea97cf6530..19863d882a 100644 --- a/compiler/optimizing/stack_map_stream.h +++ b/compiler/optimizing/stack_map_stream.h @@ -68,11 +68,8 @@ class StackMapStream : public ValueObject { location_catalog_entries_indices_(allocator->Adapter(kArenaAllocStackMapStream)), dex_register_locations_(allocator->Adapter(kArenaAllocStackMapStream)), inline_infos_(allocator->Adapter(kArenaAllocStackMapStream)), - stack_masks_(allocator->Adapter(kArenaAllocStackMapStream)), - register_masks_(allocator->Adapter(kArenaAllocStackMapStream)), method_indices_(allocator->Adapter(kArenaAllocStackMapStream)), dex_register_entries_(allocator->Adapter(kArenaAllocStackMapStream)), - stack_mask_max_(-1), out_(allocator->Adapter(kArenaAllocStackMapStream)), dex_map_hash_to_stack_map_indices_(std::less(), allocator->Adapter(kArenaAllocStackMapStream)), @@ -171,12 +168,6 @@ class StackMapStream : public ValueObject { private: size_t ComputeDexRegisterLocationCatalogSize() const; - // 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(); - // Prepare and deduplicate method indices. void PrepareMethodIndices(); @@ -217,11 +208,8 @@ class StackMapStream : public ValueObject { // A set of concatenated maps of Dex register locations indices to `location_catalog_entries_`. ScopedArenaVector dex_register_locations_; ScopedArenaVector inline_infos_; - ScopedArenaVector stack_masks_; - ScopedArenaVector register_masks_; ScopedArenaVector method_indices_; ScopedArenaVector dex_register_entries_; - int stack_mask_max_; ScopedArenaVector out_; -- cgit v1.2.3-59-g8ed1b