aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Sparc/SparcTargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-07-11 16:32:10 +0000
committerChris Lattner <sabre@nondot.org>2007-07-11 16:32:10 +0000
commit082ced939152e141d6e6e82dc56ecba13078ae18 (patch)
tree85d7558822216f613680cf8b1a8b6a4da6c094f1 /lib/Target/Sparc/SparcTargetMachine.cpp
parent97b4ac8c844e08ce1c4f4a73b85ba56775a2a6c5 (diff)
Fix an oversight: for modules with no other identifying target info,
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
Diffstat (limited to 'lib/Target/Sparc/SparcTargetMachine.cpp')
-rw-r--r--lib/Target/Sparc/SparcTargetMachine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/Sparc/SparcTargetMachine.cpp b/lib/Target/Sparc/SparcTargetMachine.cpp
index b67c3009cf..e0206d8091 100644
--- a/lib/Target/Sparc/SparcTargetMachine.cpp
+++ b/lib/Target/Sparc/SparcTargetMachine.cpp
@@ -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) {