[llvm] r188487 - make arm-use-movt available for all ARM
Renato Golin
renato.golin at linaro.org
Thu Aug 15 13:54:38 PDT 2013
Author: rengolin
Date: Thu Aug 15 15:54:38 2013
New Revision: 188487
URL: http://llvm.org/viewvc/llvm-project?rev=188487&view=rev
Log:
make arm-use-movt available for all ARM
Before this patch this flag is IOS specific, but is also
useful for bare project like bootloaders / kernels etc,
since movw / movt prevents simple relocation. Therefore
make this flag more commonly available.
note: this patch depends on a similiar rename in clang
Patch by Jeroen Hofstee.
Modified:
llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp?rev=188487&r1=188486&r2=188487&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMSubtarget.cpp Thu Aug 15 15:54:38 2013
@@ -32,7 +32,7 @@ ReserveR9("arm-reserve-r9", cl::Hidden,
cl::desc("Reserve R9, making it unavailable as GPR"));
static cl::opt<bool>
-DarwinUseMOVT("arm-darwin-use-movt", cl::init(true), cl::Hidden);
+ArmUseMOVT("arm-use-movt", cl::init(true), cl::Hidden);
static cl::opt<bool>
UseFusedMulOps("arm-use-mulops",
@@ -169,12 +169,12 @@ void ARMSubtarget::resetSubtargetFeature
if (isAAPCS_ABI())
stackAlignment = 8;
+ UseMovt = hasV6T2Ops() && ArmUseMOVT;
+
if (!isTargetIOS()) {
- UseMovt = hasV6T2Ops();
IsR9Reserved = ReserveR9;
} else {
IsR9Reserved = ReserveR9 | !HasV6Ops;
- UseMovt = DarwinUseMOVT && hasV6T2Ops();
SupportsTailCall = !getTargetTriple().isOSVersionLT(5, 0);
}
More information about the llvm-commits
mailing list