diff options
author | Chris Lattner <sabre@nondot.org> | 2006-08-26 21:33:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-08-26 21:33:05 +0000 |
commit | 16c7fe5ca3d806615a657962a30f89debe7526a7 (patch) | |
tree | ad4eaf3208829adb84e3034997e311ba495b2da3 | |
parent | d2030e6c990fdcc522d194ac34a6b71df79e3ab7 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29903 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/IA64/IA64TargetMachine.cpp | 19 | ||||
-rw-r--r-- | lib/Target/IA64/IA64TargetMachine.h | 1 |
2 files changed, 7 insertions, 13 deletions
diff --git a/lib/Target/IA64/IA64TargetMachine.cpp b/lib/Target/IA64/IA64TargetMachine.cpp index 0c5ae0d67c..ca7df274bc 100644 --- a/lib/Target/IA64/IA64TargetMachine.cpp +++ b/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 diff --git a/lib/Target/IA64/IA64TargetMachine.h b/lib/Target/IA64/IA64TargetMachine.h index 6c13664b92..267d354117 100644 --- a/lib/Target/IA64/IA64TargetMachine.h +++ b/lib/Target/IA64/IA64TargetMachine.h @@ -46,7 +46,6 @@ public: CodeGenFileType FileType, bool Fast); static unsigned getModuleMatchQuality(const Module &M); - static unsigned compileTimeMatchQuality(void); }; } // End llvm namespace |