Enable LSR by default for SPARC: it is a clear win.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26090 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-02-09 19:59:55 +00:00
parent 2f4b898e8c
commit 3ab48ed72f

View File

@ -20,15 +20,12 @@
#include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetMachineRegistry.h" #include "llvm/Target/TargetMachineRegistry.h"
#include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Scalar.h"
#include "llvm/Support/CommandLine.h"
#include <iostream> #include <iostream>
using namespace llvm; using namespace llvm;
namespace { namespace {
// Register the target. // Register the target.
RegisterTarget<SparcTargetMachine> X("sparc", " SPARC"); RegisterTarget<SparcTargetMachine> X("sparc", " SPARC");
cl::opt<bool> EnableLSR("enable-sparc-lsr", cl::Hidden);
} }
/// SparcTargetMachine ctor - Create an ILP32 architecture model /// SparcTargetMachine ctor - Create an ILP32 architecture model
@ -68,7 +65,7 @@ bool SparcTargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out,
if (FileType != TargetMachine::AssemblyFile) return true; if (FileType != TargetMachine::AssemblyFile) return true;
// Run loop strength reduction before anything else. // Run loop strength reduction before anything else.
if (EnableLSR && !Fast) PM.add(createLoopStrengthReducePass()); if (!Fast) PM.add(createLoopStrengthReducePass());
// FIXME: Implement efficient support for garbage collection intrinsics. // FIXME: Implement efficient support for garbage collection intrinsics.
PM.add(createLowerGCPass()); PM.add(createLowerGCPass());