summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-10-01 20:38:26 +0000
committerEric Christopher <echristo@gmail.com>2014-10-01 20:38:26 +0000
commit36448af7f5f43420a3be90f5bc78ef7ea39cd57d (patch)
tree0618252283ffdf2eba39358216343b0bbc6ddc5c /llvm/lib/Target/PowerPC/PPCSubtarget.cpp
parent12f4a7858199a367b0ddf3a5452f691a30c5eef0 (diff)
downloadbcm5719-llvm-36448af7f5f43420a3be90f5bc78ef7ea39cd57d.tar.gz
bcm5719-llvm-36448af7f5f43420a3be90f5bc78ef7ea39cd57d.zip
Rework the PPC TargetMachine so that the non-function specific
overrides happen at TargetMachine creation and not on every subtarget creation. llvm-svn: 218805
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCSubtarget.cpp28
1 files changed, 3 insertions, 25 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
index 64c798c2271..3ed81b4bdcb 100644
--- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
+++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
@@ -132,35 +132,13 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
// Initialize scheduling itinerary for the specified CPU.
InstrItins = getInstrItineraryForCPU(CPUName);
- // Make sure 64-bit features are available when CPUname is generic
- std::string FullFS = FS;
-
- // If we are generating code for ppc64, verify that options make sense.
- if (IsPPC64) {
- Has64BitSupport = true;
- // Silently force 64-bit register use on ppc64.
- Use64BitRegs = true;
- if (!FullFS.empty())
- FullFS = "+64bit," + FullFS;
- else
- FullFS = "+64bit";
- }
-
- // At -O2 and above, track CR bits as individual registers.
- if (OptLevel >= CodeGenOpt::Default) {
- if (!FullFS.empty())
- FullFS = "+crbits," + FullFS;
- else
- FullFS = "+crbits";
- }
-
// Parse features string.
- ParseSubtargetFeatures(CPUName, FullFS);
+ ParseSubtargetFeatures(CPUName, FS);
// If the user requested use of 64-bit regs, but the cpu selected doesn't
// support it, ignore.
- if (use64BitRegs() && !has64BitSupport())
- Use64BitRegs = false;
+ if (IsPPC64 && has64BitSupport())
+ Use64BitRegs = true;
// Set up darwin-specific properties.
if (isDarwin())
OpenPOWER on IntegriCloud