mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-21 03:05:15 +00:00
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
This commit is contained in:
parent
f94ddf0d12
commit
3c5fa40194
@ -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
|
||||
|
@ -46,7 +46,6 @@ public:
|
||||
CodeGenFileType FileType, bool Fast);
|
||||
|
||||
static unsigned getModuleMatchQuality(const Module &M);
|
||||
static unsigned compileTimeMatchQuality(void);
|
||||
|
||||
};
|
||||
} // End llvm namespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user