diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-01-21 18:55:51 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-01-21 18:55:51 +0000 |
commit | 53519f015e3e84e9f57b677cc8724805a6009b73 (patch) | |
tree | 9dc5278d12bc25af77dc2cab022413ef2b034741 /lib/Target/ARM/ARMSubtarget.cpp | |
parent | 859f8183639346378ed29d1e04a4b070ebc7e97f (diff) |
Last round of fixes for movw + movt global address codegen.
1. Fixed ARM pc adjustment.
2. Fixed dynamic-no-pic codegen
3. CSE of pc-relative load of global addresses.
It's now enabled by default for Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123991 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.cpp')
-rw-r--r-- | lib/Target/ARM/ARMSubtarget.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp index 366af55369..0bd740cfb2 100644 --- a/lib/Target/ARM/ARMSubtarget.cpp +++ b/lib/Target/ARM/ARMSubtarget.cpp @@ -25,7 +25,7 @@ ReserveR9("arm-reserve-r9", cl::Hidden, cl::desc("Reserve R9, making it unavailable as GPR")); static cl::opt<bool> -UseMOVT("arm-darwin-use-movt", cl::init(false), cl::Hidden); +DarwinUseMOVT("arm-darwin-use-movt", cl::init(true), cl::Hidden); static cl::opt<bool> StrictAlign("arm-strict-align", cl::Hidden, @@ -150,11 +150,7 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &FS, UseMovt = hasV6T2Ops(); else { IsR9Reserved = ReserveR9 | (ARMArchVersion < V6); - if (UseMOVT && hasV6T2Ops()) { - unsigned Maj, Min, Rev; - TargetTriple.getDarwinNumber(Maj, Min, Rev); - UseMovt = Maj > 4; - } + UseMovt = DarwinUseMOVT && hasV6T2Ops(); } if (!isThumb() || hasThumb2()) |