diff options
author | Vladimir Marko <vmarko@google.com> | 2015-04-08 10:01:01 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2015-04-08 16:36:19 +0100 |
commit | 87b7c52ac660119b8dea46967974b76c86d0750b (patch) | |
tree | 9f80325934dd7568b8288224a155284fea97bd9a /compiler/dex/mir_method_info.h | |
parent | 8635e1886f3624154c076cf40cbf182c74e2e0e3 (diff) | |
download | art-87b7c52ac660119b8dea46967974b76c86d0750b.tar.gz art-87b7c52ac660119b8dea46967974b76c86d0750b.tar.bz2 art-87b7c52ac660119b8dea46967974b76c86d0750b.zip |
Quick: Clean up temp use counting.
For the boot image on arm64 and x86-64 we're using true
PC-relative addressing, so pc_rel_temp_ is nullptr and
CanUsePcRelDexCacheArrayLoad() returns true, but we're not
actually using the ArtMethod* so fix the AnalyzeMIR() to
take it into account.
Also don't count intrinsic invokes towards ArtMethod* uses.
To avoid repeated method inliner inquiries about whether a
method is intrinsic or special (requiring lock acquisition),
cache that information in MirMethodLoweringInfo. As part of
that cleanup, take quickened invokes into account for
suspend check elimination.
Change-Id: I5b4ec124221c0db1314c8e72675976c110ebe7ca
Diffstat (limited to 'compiler/dex/mir_method_info.h')
-rw-r--r-- | compiler/dex/mir_method_info.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/compiler/dex/mir_method_info.h b/compiler/dex/mir_method_info.h index e131c96a81..7230c462cd 100644 --- a/compiler/dex/mir_method_info.h +++ b/compiler/dex/mir_method_info.h @@ -127,6 +127,14 @@ class MirMethodLoweringInfo : public MirMethodInfo { return (flags_ & kFlagFastPath) != 0u; } + bool IsIntrinsic() const { + return (flags_ & kFlagIsIntrinsic) != 0u; + } + + bool IsSpecial() const { + return (flags_ & kFlagIsSpecial) != 0u; + } + bool IsReferrersClass() const { return (flags_ & kFlagIsReferrersClass) != 0; } @@ -188,9 +196,11 @@ class MirMethodLoweringInfo : public MirMethodInfo { private: enum { kBitFastPath = kMethodInfoBitEnd, + kBitIsIntrinsic, + kBitIsSpecial, kBitInvokeTypeBegin, kBitInvokeTypeEnd = kBitInvokeTypeBegin + 3, // 3 bits for invoke type. - kBitSharpTypeBegin, + kBitSharpTypeBegin = kBitInvokeTypeEnd, kBitSharpTypeEnd = kBitSharpTypeBegin + 3, // 3 bits for sharp type. kBitIsReferrersClass = kBitSharpTypeEnd, kBitClassIsInitialized, @@ -199,6 +209,8 @@ class MirMethodLoweringInfo : public MirMethodInfo { }; static_assert(kMethodLoweringInfoBitEnd <= 16, "Too many flags"); static constexpr uint16_t kFlagFastPath = 1u << kBitFastPath; + static constexpr uint16_t kFlagIsIntrinsic = 1u << kBitIsIntrinsic; + static constexpr uint16_t kFlagIsSpecial = 1u << kBitIsSpecial; static constexpr uint16_t kFlagIsReferrersClass = 1u << kBitIsReferrersClass; static constexpr uint16_t kFlagClassIsInitialized = 1u << kBitClassIsInitialized; static constexpr uint16_t kFlagQuickened = 1u << kBitQuickened; |