aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/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/PowerPC/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/PowerPC/TargetInfo')
-rw-r--r--lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp b/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp
index ca1f490..3d25dad 100644
--- a/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp
+++ b/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp
@@ -14,14 +14,6 @@ using namespace llvm;
Target llvm::ThePPC32Target;
-static unsigned PPC32_JITMatchQuality() {
-#if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER) || defined(__PPC__)
- if (sizeof(void*) == 4)
- return 10;
-#endif
- return 0;
-}
-
static unsigned PPC32_TripleMatchQuality(const std::string &TT) {
// We strongly match "powerpc-*".
if (TT.size() >= 8 && std::string(TT.begin(), TT.begin()+8) == "powerpc-")
@@ -45,19 +37,11 @@ static unsigned PPC32_ModuleMatchQuality(const Module &M) {
M.getPointerSize() != Module::AnyPointerSize)
return 0; // Match for some other target
- return PPC32_JITMatchQuality()/2;
+ return 0;
}
Target llvm::ThePPC64Target;
-static unsigned PPC64_JITMatchQuality() {
-#if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER) || defined(__PPC__)
- if (sizeof(void*) == 8)
- return 10;
-#endif
- return 0;
-}
-
static unsigned PPC64_TripleMatchQuality(const std::string &TT) {
// We strongly match "powerpc64-*".
if (TT.size() >= 10 && std::string(TT.begin(), TT.begin()+10) == "powerpc64-")
@@ -81,7 +65,7 @@ static unsigned PPC64_ModuleMatchQuality(const Module &M) {
M.getPointerSize() != Module::AnyPointerSize)
return 0; // Match for some other target
- return PPC64_JITMatchQuality()/2;
+ return 0;
}
extern "C" void LLVMInitializePowerPCTargetInfo() {
@@ -89,11 +73,11 @@ extern "C" void LLVMInitializePowerPCTargetInfo() {
"PowerPC 32",
&PPC32_TripleMatchQuality,
&PPC32_ModuleMatchQuality,
- &PPC32_JITMatchQuality);
+ /*HasJIT=*/true);
TargetRegistry::RegisterTarget(ThePPC64Target, "ppc64",
"PowerPC 64",
&PPC64_TripleMatchQuality,
&PPC64_ModuleMatchQuality,
- &PPC64_JITMatchQuality);
+ /*HasJIT=*/true);
}