Deduplicate register masks
Data is commonly shared between different stack maps. The register
masks are stored after the stack masks.
Oat size for a large app:
96722288 -> 94485872 (-2.31%)
Average oat size reduction according to golem -3.193%.
Bug: 34621054
Test: test-art-host
Change-Id: I5eacf668992e866d11ddba0c01675038a16cdfb4
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc
index 3ba3011..bf99509 100644
--- a/runtime/quick_exception_handler.cc
+++ b/runtime/quick_exception_handler.cc
@@ -407,7 +407,7 @@
CodeInfoEncoding encoding = code_info.ExtractEncoding();
StackMap stack_map = code_info.GetStackMapForNativePcOffset(native_pc_offset, encoding);
const size_t number_of_vregs = m->GetCodeItem()->registers_size_;
- uint32_t register_mask = stack_map.GetRegisterMask(encoding.stack_map_encoding);
+ uint32_t register_mask = code_info.GetRegisterMaskOf(encoding, stack_map);
BitMemoryRegion stack_mask = code_info.GetStackMaskOf(encoding, stack_map);
DexRegisterMap vreg_map = IsInInlinedFrame()
? code_info.GetDexRegisterMapAtDepth(GetCurrentInliningDepth() - 1,