aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMSubtarget.cpp
diff options
context:
space:
mode:
authorDavid Goodwin <david_goodwin@apple.com>2009-10-01 22:19:57 +0000
committerDavid Goodwin <david_goodwin@apple.com>2009-10-01 22:19:57 +0000
commit736fed9ff71ae677a7c947ac80ebb42a527de0dc (patch)
treefaad56e6175ff6097b9b93bf2be6cd89bf3657f7 /lib/Target/ARM/ARMSubtarget.cpp
parent5d14abe36967fe67c85915dc6102a3b24fc1cd4a (diff)
downloadexternal_llvm-736fed9ff71ae677a7c947ac80ebb42a527de0dc.zip
external_llvm-736fed9ff71ae677a7c947ac80ebb42a527de0dc.tar.gz
external_llvm-736fed9ff71ae677a7c947ac80ebb42a527de0dc.tar.bz2
Remove neonfp attribute and instead set default based on CPU string. Add -arm-use-neon-fp to override the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.cpp')
-rw-r--r--lib/Target/ARM/ARMSubtarget.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp
index 704cf7a..cf1ee3f 100644
--- a/lib/Target/ARM/ARMSubtarget.cpp
+++ b/lib/Target/ARM/ARMSubtarget.cpp
@@ -21,12 +21,16 @@ using namespace llvm;
static cl::opt<bool>
ReserveR9("arm-reserve-r9", cl::Hidden,
cl::desc("Reserve R9, making it unavailable as GPR"));
+static cl::opt<bool>
+UseNEONFP("arm-use-neon-fp",
+ cl::desc("Use NEON for single-precision FP"),
+ cl::init(false), cl::Hidden);
ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &FS,
bool isThumb)
: ARMArchVersion(V4T)
, ARMFPUType(None)
- , UseNEONForSinglePrecisionFP(false)
+ , UseNEONForSinglePrecisionFP(UseNEONFP)
, IsThumb(isThumb)
, ThumbMode(Thumb1)
, PostRAScheduler(false)
@@ -97,6 +101,8 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &FS,
// Set CPU specific features.
if (CPUString == "cortex-a8") {
PostRAScheduler = true;
+ if (UseNEONFP.getPosition() == 0)
+ UseNEONForSinglePrecisionFP = true;
}
}