aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/TargetInfo
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-25 10:09:50 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-25 10:09:50 +0000
commitd6fd377f3333922c4e928019cdfa124ff7f4dd2e (patch)
treeda15e380d88d8a3072e1d8cf434f424880b0a2ce /lib/Target/ARM/TargetInfo
parente0d12d5f7b0a6369df128c8b0cc43e6e08a804a0 (diff)
downloadexternal_llvm-d6fd377f3333922c4e928019cdfa124ff7f4dd2e.zip
external_llvm-d6fd377f3333922c4e928019cdfa124ff7f4dd2e.tar.gz
external_llvm-d6fd377f3333922c4e928019cdfa124ff7f4dd2e.tar.bz2
Simplify JIT target selection.
- Instead of requiring targets to define a JIT quality match function, we just have them specify if they support a JIT. - Target selection for the JIT just gets the host triple and looks for the best target which matches the triple and has a JIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/TargetInfo')
-rw-r--r--lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp b/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp
index d709463..a9f99e0 100644
--- a/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp
+++ b/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp
@@ -14,13 +14,6 @@ using namespace llvm;
Target llvm::TheARMTarget;
-static unsigned ARM_JITMatchQuality() {
-#if defined(__arm__)
- return 10;
-#endif
- return 0;
-}
-
static unsigned ARM_TripleMatchQuality(const std::string &TT) {
// Match arm-foo-bar, as well as things like armv5blah-*
if (TT.size() >= 4 &&
@@ -45,18 +38,11 @@ static unsigned ARM_ModuleMatchQuality(const Module &M) {
M.getPointerSize() != Module::AnyPointerSize)
return 0; // Match for some other target
- return ARM_JITMatchQuality()/2;
+ return 0;
}
Target llvm::TheThumbTarget;
-static unsigned Thumb_JITMatchQuality() {
-#if defined(__thumb__)
- return 10;
-#endif
- return 0;
-}
-
static unsigned Thumb_TripleMatchQuality(const std::string &TT) {
// Match thumb-foo-bar, as well as things like thumbv5blah-*
if (TT.size() >= 6 &&
@@ -81,7 +67,7 @@ static unsigned Thumb_ModuleMatchQuality(const Module &M) {
M.getPointerSize() != Module::AnyPointerSize)
return 0; // Match for some other target
- return Thumb_JITMatchQuality()/2;
+ return 0;
}
extern "C" void LLVMInitializeARMTargetInfo() {
@@ -89,11 +75,11 @@ extern "C" void LLVMInitializeARMTargetInfo() {
"ARM",
&ARM_TripleMatchQuality,
&ARM_ModuleMatchQuality,
- &ARM_JITMatchQuality);
+ /*HasJIT=*/true);
TargetRegistry::RegisterTarget(TheThumbTarget, "thumb",
"Thumb",
&Thumb_TripleMatchQuality,
&Thumb_ModuleMatchQuality,
- &Thumb_JITMatchQuality);
+ /*HasJIT=*/true);
}