Consolidate the GPOpt stuff to all use the Subtarget, instead of still
depending on the command line option.  Now the command line option just
sets the subtarget as appropriate.  G5 opts will now default to on on
G5-enabled nightly testers among other machines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22688 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
index 009f4eb..9b2670c 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -30,25 +30,8 @@
 #include <iostream>
 using namespace llvm;
 
-bool llvm::GPOPT = false;
-PPCTargetEnum llvm::PPCTarget = TargetDefault;
-
-namespace llvm {
-  cl::opt<PPCTargetEnum, true>
-  PPCTargetArg(
-         cl::desc("Force generation of code for a specific PPC target:"),
-         cl::values(
-                    clEnumValN(TargetAIX,  "aix", "  Enable AIX codegen"),
-                    clEnumValN(TargetDarwin,"darwin","  Enable Darwin codegen"),
-                    clEnumValEnd),
-         cl::location(PPCTarget), cl::init(TargetDefault));
-  cl::opt<bool> EnablePPCLSR("enable-lsr-for-ppc",
-                             cl::desc("Enable LSR for PPC (beta)"),
-                             cl::Hidden);
-  cl::opt<bool, true> EnableGPOPT("enable-gpopt", cl::Hidden,
-                                  cl::location(GPOPT),
-                                  cl::desc("Enable optimizations for GP cpus"));
-}
+static cl::opt<bool> EnablePPCLSR("enable-lsr-for-ppc", cl::Hidden,
+                                  cl::desc("Enable LSR for PPC (beta)"));
 
 namespace {
   const std::string PPC32ID = "PowerPC/32bit";
@@ -71,8 +54,8 @@
                                            const PowerPCFrameInfo &TFI)
 : TargetMachine(name, IL, TD), FrameInfo(TFI), Subtarget(M) {
   if (TargetDefault == PPCTarget) {
-    if (Subtarget.IsAIX()) PPCTarget = TargetAIX;
-    if (Subtarget.IsDarwin()) PPCTarget = TargetDarwin;
+    if (Subtarget.isAIX()) PPCTarget = TargetAIX;
+    if (Subtarget.isDarwin()) PPCTarget = TargetDarwin;
   }
 }