summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/IA64/IA64TargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-08-26 21:33:05 +0000
committerChris Lattner <sabre@nondot.org>2006-08-26 21:33:05 +0000
commit4042e871cef34e2f8964c65162352f5d803af2e1 (patch)
tree1c0c0498c521996fa21b816512c3196734c97951 /llvm/lib/Target/IA64/IA64TargetMachine.cpp
parent7851db75d99aed348f4fa99952a7dc73eaa5e9bd (diff)
downloadbcm5719-llvm-4042e871cef34e2f8964c65162352f5d803af2e1.tar.gz
bcm5719-llvm-4042e871cef34e2f8964c65162352f5d803af2e1.zip
Fix target matching weights, so that ppc-darwin modules are codegen with the
ppc target, not the itanium target, when run on an itanium machine. This should fix the CodeGen/PowerPC regtest failures on itanium. llvm-svn: 29903
Diffstat (limited to 'llvm/lib/Target/IA64/IA64TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/IA64/IA64TargetMachine.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/llvm/lib/Target/IA64/IA64TargetMachine.cpp b/llvm/lib/Target/IA64/IA64TargetMachine.cpp
index 0c5ae0d67c6..ca7df274bcf 100644
--- a/llvm/lib/Target/IA64/IA64TargetMachine.cpp
+++ b/llvm/lib/Target/IA64/IA64TargetMachine.cpp
@@ -44,14 +44,6 @@ namespace {
RegisterTarget<IA64TargetMachine> X("ia64", " IA-64 (Itanium)");
}
-unsigned IA64TargetMachine::compileTimeMatchQuality() {
-#if defined(__ia64__) || defined(__IA64__)
- return 50;
-#else
- return 0;
-#endif
-}
-
unsigned IA64TargetMachine::getModuleMatchQuality(const Module &M) {
// we match [iI][aA]*64
bool seenIA64=false;
@@ -65,12 +57,15 @@ unsigned IA64TargetMachine::getModuleMatchQuality(const Module &M) {
seenIA64=true;
}
- if(seenIA64)
- return 50; // strong match
+ if (seenIA64)
+ return 20; // strong match
}
- return compileTimeMatchQuality()/2;
-
+#if defined(__ia64__) || defined(__IA64__)
+ return 5;
+#else
+ return 0;
+#endif
}
/// IA64TargetMachine ctor - Create an LP64 architecture model
OpenPOWER on IntegriCloud