OK, this does wonders for broken stuff
[oota-llvm.git] / lib / Target / Alpha / AlphaTargetMachine.cpp
index 37f71b25af9f4ec5f5fe47ba57648472f4e64332..21a7f989810b8df1fcccb855d076391b261e1e9e 100644 (file)
@@ -29,9 +29,6 @@ namespace {
 }
 
 namespace llvm {
-  cl::opt<bool> EnableAlphaLSR("enable-lsr-for-alpha",
-                             cl::desc("Enable LSR for Alpha (beta option!)"),
-                             cl::Hidden);
   cl::opt<bool> EnableAlphaDAG("enable-dag-isel-for-alpha",
                              cl::desc("Enable DAG ISEL for Alpha (beta option!)"),
                              cl::Hidden);
@@ -51,7 +48,7 @@ unsigned AlphaTargetMachine::getModuleMatchQuality(const Module &M) {
            M.getPointerSize() != Module::AnyPointerSize)
     return 0;                                    // Match for some other target
 
-  return 0;
+  return getJITMatchQuality()/2;
 }
 
 unsigned AlphaTargetMachine::getJITMatchQuality() {
@@ -77,14 +74,14 @@ AlphaTargetMachine::AlphaTargetMachine(const Module &M, IntrinsicLowering *IL,
 ///
 bool AlphaTargetMachine::addPassesToEmitFile(PassManager &PM,
                                              std::ostream &Out,
-                                             CodeGenFileType FileType) {
+                                             CodeGenFileType FileType,
+                                             bool Fast) {
   if (FileType != TargetMachine::AssemblyFile) return true;
 
-  if (EnableAlphaLSR) {
-    PM.add(createLoopStrengthReducePass());
-    PM.add(createCFGSimplificationPass());
-  }
+  PM.add(createLoopStrengthReducePass());
+  PM.add(createCFGSimplificationPass());
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());
 
@@ -123,10 +120,8 @@ bool AlphaTargetMachine::addPassesToEmitFile(PassManager &PM,
 
 void AlphaJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
 
-  if (EnableAlphaLSR) {
-    PM.add(createLoopStrengthReducePass());
-    PM.add(createCFGSimplificationPass());
-  }
+  PM.add(createLoopStrengthReducePass());
+  PM.add(createCFGSimplificationPass());
 
   // FIXME: Implement efficient support for garbage collection intrinsics.
   PM.add(createLowerGCPass());