diff options
author | 2021-10-01 09:26:56 +0100 | |
---|---|---|
committer | 2021-10-26 13:51:31 +0000 | |
commit | d690f8ae8f8e2675bc52089a83ac18c749f8e6d2 (patch) | |
tree | dac10b65d901cad87d6dbb7b48453f6da214a76f /runtime/stack_map.h | |
parent | e91a954ee350cbc0b311f342c90697191e1ae495 (diff) |
Inline across dex files for bootclaspath's methods
We can relax a bit the restriction for not inlining across dexfiles when
we are AoT compiling and we need an environment. There's an added new
restriction related to BSS entries. We could potentially inline across
dex files for those cases too but are left to be solved in follow-up
CLs.
Bug: 154012332
Test: ART tests
Change-Id: I5122b26c79b3e30d2643c0ccc05d595a0047953e
Diffstat (limited to 'runtime/stack_map.h')
-rw-r--r-- | runtime/stack_map.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/stack_map.h b/runtime/stack_map.h index 103402baa6..714895744b 100644 --- a/runtime/stack_map.h +++ b/runtime/stack_map.h @@ -262,10 +262,13 @@ class RegisterMask : public BitTableAccessor<2> { // Method indices are not very dedup friendly. // Separating them greatly improves dedup efficiency of the other tables. -class MethodInfo : public BitTableAccessor<1> { +class MethodInfo : public BitTableAccessor<2> { public: BIT_TABLE_HEADER(MethodInfo) BIT_TABLE_COLUMN(0, MethodIndex) + BIT_TABLE_COLUMN(1, DexFileIndex) + + static constexpr uint32_t kSameDexFile = -1; }; /** @@ -360,8 +363,12 @@ class CodeInfo { return stack_maps_.NumRows(); } + MethodInfo GetMethodInfoOf(InlineInfo inline_info) const { + return method_infos_.GetRow(inline_info.GetMethodInfoIndex()); + } + uint32_t GetMethodIndexOf(InlineInfo inline_info) const { - return method_infos_.GetRow(inline_info.GetMethodInfoIndex()).GetMethodIndex(); + return GetMethodInfoOf(inline_info).GetMethodIndex(); } ALWAYS_INLINE DexRegisterMap GetDexRegisterMapOf(StackMap stack_map) const { |