From 1f2ce44db2613a1e60a66c3c454834b72e994f57 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 22 Apr 2016 12:16:29 +0100 Subject: Thumb2: Reduce memory used for fixup dependencies. Mark fixups for far backward branches as 32-bit from the beginning and ignore their dependencies since they cannot be expanded anymore. This reduces the memory used by the fixup_dependents_ when compiling methods with a lot of slow paths. Bug: 28256882 Change-Id: I0b7155ed8970b69703fa9c4666d9c4961e425721 --- compiler/utils/arm/assembler_thumb2.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'compiler/utils/arm/assembler_thumb2.h') diff --git a/compiler/utils/arm/assembler_thumb2.h b/compiler/utils/arm/assembler_thumb2.h index 111a6b09d7..bc5b708e88 100644 --- a/compiler/utils/arm/assembler_thumb2.h +++ b/compiler/utils/arm/assembler_thumb2.h @@ -538,6 +538,20 @@ class Thumb2Assembler FINAL : public ArmAssembler { return GetType() >= kLoadLiteralNarrow; } + // Returns whether the Fixup can expand from the original size. + bool CanExpand() const { + switch (GetOriginalSize()) { + case kBranch32Bit: + case kCbxz48Bit: + case kLiteralFar: + case kLiteralAddrFar: + case kLongOrFPLiteralFar: + return false; + default: + return true; + } + } + Size GetOriginalSize() const { return original_size_; } -- cgit v1.2.3-59-g8ed1b