Fix an oversight: for modules with no other identifying target info,
authorChris Lattner <sabre@nondot.org>
Wed, 11 Jul 2007 16:32:10 +0000 (16:32 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 11 Jul 2007 16:32:10 +0000 (16:32 +0000)
the sparc backend should be preferred when running on sparcs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39142 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcTargetMachine.cpp

index b67c3009cf8bf1163595f32efd2946b51990a37f..e0206d809168e05a6234424591bf1d81ee72abb3 100644 (file)
@@ -54,7 +54,11 @@ unsigned SparcTargetMachine::getModuleMatchQuality(const Module &M) {
            M.getPointerSize() != Module::AnyPointerSize)
     return 0;                                    // Match for some other target
 
+#if defined(__sparc__)
+  return 10;
+#else
   return 0;
+#endif
 }
 
 bool SparcTargetMachine::addInstSelector(FunctionPassManager &PM, bool Fast) {