diff options
author | Stephen Lin <stephenwlin@gmail.com> | 2013-06-26 21:42:14 +0000 |
---|---|---|
committer | Stephen Lin <stephenwlin@gmail.com> | 2013-06-26 21:42:14 +0000 |
commit | ff7fceed7d67a5137ae7827ef605a369c1b85cfa (patch) | |
tree | 60fc8b604126fc8313474053867e10527b338d2a /llvm/lib/Target/ARM/ARMBaseRegisterInfo.h | |
parent | ffc6d499822c0c972bda440bf0bfc6b541f8f06b (diff) | |
download | bcm5719-llvm-ff7fceed7d67a5137ae7827ef605a369c1b85cfa.tar.gz bcm5719-llvm-ff7fceed7d67a5137ae7827ef605a369c1b85cfa.zip |
ARM: Proactively ensure that the LowerCallResult hack for 'this'-returns is not used for incompatible calling conventions.
(Currently, ARM 'this'-returns are handled in the standard calling convention case by treating R0 as preserved and doing some extra magic in LowerCallResult; this may not apply to calling conventions added in the future so this patch provides and documents an interface for indicating such)
llvm-svn: 185024
Diffstat (limited to 'llvm/lib/Target/ARM/ARMBaseRegisterInfo.h')
-rw-r--r-- | llvm/lib/Target/ARM/ARMBaseRegisterInfo.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h index 03b36825419..be3f1368f69 100644 --- a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h +++ b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h @@ -94,9 +94,18 @@ public: /// Code Generation virtual methods... const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const; const uint32_t *getCallPreservedMask(CallingConv::ID) const; - const uint32_t *getThisReturnPreservedMask(CallingConv::ID) const; const uint32_t *getNoPreservedMask() const; + // getThisReturnPreservedMask - Returns a call preserved mask specific to the + // case that 'returned' is an i32 first argument if the calling convention + // is one that can (partially) model this attribute with a preserved mask + // (i.e. it is a calling convention that uses the same register for the first + // i32 argument and an i32 return value) + // + // Should return NULL in the case that the calling convention does not have + // this property + const uint32_t *getThisReturnPreservedMask(CallingConv::ID) const; + BitVector getReservedRegs(const MachineFunction &MF) const; const TargetRegisterClass* |