Index: src/IceTargetLoweringARM32.h |
diff --git a/src/IceTargetLoweringARM32.h b/src/IceTargetLoweringARM32.h |
index 198563cda9d7980fe217bfca2de9a4e6941ce38a..6bb7d419310e5088c9d8f2ee13b2301f568256e4 100644 |
--- a/src/IceTargetLoweringARM32.h |
+++ b/src/IceTargetLoweringARM32.h |
@@ -72,6 +72,8 @@ public: |
SizeT getFrameOrStackReg() const override { |
return UsesFramePointer ? RegARM32::Reg_fp : RegARM32::Reg_sp; |
} |
+ SizeT getReservedTmpReg() const { return RegARM32::Reg_ip; } |
+ |
size_t typeWidthInBytesOnStack(Type Ty) const override { |
// Round up to the next multiple of 4 bytes. In particular, i1, |
// i8, and i16 are rounded up to 4 bytes. |
@@ -380,6 +382,16 @@ protected: |
Context.insert(InstARM32Uxt::create(Func, Dest, Src0, Pred)); |
} |
+ /// Run a pass through stack variables and ensure that the offsets are legal. |
+ /// If the offset is not legal, use a new base register that accounts for |
+ /// the offset, such that the addressing mode offset bits are now legal. |
+ void legalizeStackSlots(); |
+ /// Returns true if the given Offset can be represented in a stack ldr/str. |
+ bool isLegalVariableStackOffset(int32_t Offset) const; |
+ /// Assuming Var needs its offset legalized, define a new base register |
+ /// centered on the given Var's offset and use it. |
+ StackVariable *legalizeVariableSlot(Variable *Var, Variable *OrigBaseReg); |
+ |
TargetARM32Features CPUFeatures; |
bool UsesFramePointer = false; |
bool NeedsStackAlignment = false; |