diff options
| author | 2017-02-22 14:41:46 +0000 | |
|---|---|---|
| committer | 2017-02-22 14:41:47 +0000 | |
| commit | fc5d8c28e5265634aeeb2f255dc8d5747e2919ee (patch) | |
| tree | ef7060599e7e0b631ec5984158eb9b5cb6b74d86 /compiler/optimizing/stack_map_stream.cc | |
| parent | 240f32428c693eea6b934db31a863a0cd39c3055 (diff) | |
| parent | 9c57113ab1469a65cea2c0ec48dae2fdce9a8f19 (diff) | |
Merge "Move StackMapStream deduplication maps to arena."
Diffstat (limited to 'compiler/optimizing/stack_map_stream.cc')
| -rw-r--r-- | compiler/optimizing/stack_map_stream.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler/optimizing/stack_map_stream.cc b/compiler/optimizing/stack_map_stream.cc index eeae96e6c2..4d12ad6eb6 100644 --- a/compiler/optimizing/stack_map_stream.cc +++ b/compiler/optimizing/stack_map_stream.cc @@ -16,8 +16,6 @@ #include "stack_map_stream.h" -#include <unordered_map> - #include "art_method-inl.h" #include "base/stl_util.h" #include "optimizing/optimizing_compiler.h" @@ -526,7 +524,7 @@ void StackMapStream::CheckDexRegisterMap(const CodeInfo& code_info, size_t StackMapStream::PrepareRegisterMasks() { register_masks_.resize(stack_maps_.size(), 0u); - std::unordered_map<uint32_t, size_t> dedupe; + ArenaUnorderedMap<uint32_t, size_t> dedupe(allocator_->Adapter(kArenaAllocStackMapStream)); for (StackMapEntry& stack_map : stack_maps_) { const size_t index = dedupe.size(); stack_map.register_mask_index = dedupe.emplace(stack_map.register_mask, index).first->second; @@ -541,10 +539,11 @@ size_t StackMapStream::PrepareStackMasks(size_t entry_size_in_bits) { stack_masks_.resize(byte_entry_size * stack_maps_.size(), 0u); // For deduplicating we store the stack masks as byte packed for simplicity. We can bit pack later // when copying out from stack_masks_. - std::unordered_map<MemoryRegion, - size_t, - FNVHash<MemoryRegion>, - MemoryRegion::ContentEquals> dedup(stack_maps_.size()); + ArenaUnorderedMap<MemoryRegion, + size_t, + FNVHash<MemoryRegion>, + MemoryRegion::ContentEquals> dedup( + stack_maps_.size(), allocator_->Adapter(kArenaAllocStackMapStream)); for (StackMapEntry& stack_map : stack_maps_) { size_t index = dedup.size(); MemoryRegion stack_mask(stack_masks_.data() + index * byte_entry_size, byte_entry_size); |