summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-03-26 00:50:23 +0000
committerEric Christopher <echristo@gmail.com>2015-03-26 00:50:23 +0000
commited1042b97c7646bad3db094403ac7264e59b78d9 (patch)
tree7cac6b0d5b2705e4a5906e2774d295a59aa3b958 /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
parent118ee4c07bc625dc3dbfcca82420938a6469d1ef (diff)
downloadbcm5719-llvm-ed1042b97c7646bad3db094403ac7264e59b78d9.tar.gz
bcm5719-llvm-ed1042b97c7646bad3db094403ac7264e59b78d9.zip
Add computeFSAdditions to the function based subtarget creation
for PPC due to some unfortunate default setting via TargetMachine creation. I've added a FIXME on how this can be unraveled in the backend and a test to make sure we successfully legalize 64-bit things if we say we're 64-bits. llvm-svn: 233239
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index 5d1f2387e82..7267529ef81 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -207,7 +207,15 @@ PPCTargetMachine::getSubtargetImpl(const Function &F) const {
// creation will depend on the TM and the code generation flags on the
// function that reside in TargetOptions.
resetTargetOptions(F);
- I = llvm::make_unique<PPCSubtarget>(TargetTriple, CPU, FS, *this);
+ I = llvm::make_unique<PPCSubtarget>(
+ TargetTriple, CPU,
+ // FIXME: It would be good to have the subtarget additions here
+ // not necessary. Anything that turns them on/off (overrides) ends
+ // up being put at the end of the feature string, but the defaults
+ // shouldn't require adding them. Fixing this means pulling Feature64Bit
+ // out of most of the target cpus in the .td file and making it set only
+ // as part of initialization via the TargetTriple.
+ computeFSAdditions(FS, getOptLevel(), getTargetTriple()), *this);
}
return I.get();
}
OpenPOWER on IntegriCloud