diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2015-07-20 23:21:30 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2015-07-20 23:21:30 +0000 |
commit | 7482d40cd57bbfe173993b9945f5dbece774a9a8 (patch) | |
tree | 98c29b0f22fad4fbb8e99468769b35cc123a5023 /llvm/lib/Target/ARM/ARMSubtarget.cpp | |
parent | 6b7fff9ce57f42dbc0f20f8884a210007b201aa6 (diff) | |
download | llvm-7482d40cd57bbfe173993b9945f5dbece774a9a8.zip llvm-7482d40cd57bbfe173993b9945f5dbece774a9a8.tar.gz llvm-7482d40cd57bbfe173993b9945f5dbece774a9a8.tar.bz2 |
[ARM] Define subtarget feature "reserve-r9", which is used to decide
whether register r9 should be reserved.
This change is needed because we cannot use a backend option to set
cl::opt "arm-reserve-r9" when doing LTO.
Out-of-tree projects currently using cl::opt option "-arm-reserve-r9" to
reserve r9 should make changes to add subtarget feature "reserve-r9" to
the IR.
rdar://problem/21529937
Differential Revision: http://reviews.llvm.org/D11320
llvm-svn: 242737
Diffstat (limited to 'llvm/lib/Target/ARM/ARMSubtarget.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMSubtarget.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp index 3180480..9d2f029 100644 --- a/llvm/lib/Target/ARM/ARMSubtarget.cpp +++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp @@ -40,10 +40,6 @@ using namespace llvm; #include "ARMGenSubtargetInfo.inc" static cl::opt<bool> -ReserveR9("arm-reserve-r9", cl::Hidden, - cl::desc("Reserve R9, making it unavailable as GPR")); - -static cl::opt<bool> UseFusedMulOps("arm-use-mulops", cl::init(true), cl::Hidden); @@ -144,7 +140,7 @@ void ARMSubtarget::initializeEnvironment() { UseSoftFloat = false; HasThumb2 = false; NoARM = false; - IsR9Reserved = ReserveR9; + ReserveR9 = false; NoMovt = false; SupportsTailCall = false; HasFP16 = false; @@ -212,13 +208,10 @@ void ARMSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) { if (isTargetNaCl()) stackAlignment = 16; - if (isTargetMachO()) { - IsR9Reserved = ReserveR9 || !HasV6Ops; + if (isTargetMachO()) SupportsTailCall = !isTargetIOS() || !getTargetTriple().isOSVersionLT(5, 0); - } else { - IsR9Reserved = ReserveR9; + else SupportsTailCall = !isThumb1Only(); - } if (Align == DefaultAlign) { // Assume pre-ARMv6 doesn't support unaligned accesses. |