summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/Sparc.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-30 03:56:16 +0000
committerChris Lattner <sabre@nondot.org>2002-07-30 03:56:16 +0000
commit31d05fdd0a6c883c5d7894d8e84c158a4b52dc22 (patch)
tree681996cd67310fa05490085f14a768d7fe9cf99a /llvm/lib/Target/Sparc/Sparc.cpp
parentc3b3a825eb818260cd5ec13d7f40cdc344c28fab (diff)
downloadbcm5719-llvm-31d05fdd0a6c883c5d7894d8e84c158a4b52dc22.tar.gz
bcm5719-llvm-31d05fdd0a6c883c5d7894d8e84c158a4b52dc22.zip
* Move InstructionSelection pass to lib/CodeGen/InstrSelection so it is
shared by backends. llvm-svn: 3146
Diffstat (limited to 'llvm/lib/Target/Sparc/Sparc.cpp')
-rw-r--r--llvm/lib/Target/Sparc/Sparc.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/llvm/lib/Target/Sparc/Sparc.cpp b/llvm/lib/Target/Sparc/Sparc.cpp
index aaf87a3979c..e9f4b37dc26 100644
--- a/llvm/lib/Target/Sparc/Sparc.cpp
+++ b/llvm/lib/Target/Sparc/Sparc.cpp
@@ -12,7 +12,6 @@
#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/CodeGen/MachineCodeForMethod.h"
#include "llvm/CodeGen/RegisterAllocation.h"
-//#include "llvm/CodeGen/MappingInfo.h"
#include "llvm/Function.h"
#include "llvm/BasicBlock.h"
#include "llvm/PassManager.h"
@@ -142,22 +141,6 @@ public:
}
};
-class InstructionSelection : public FunctionPass {
- TargetMachine &Target;
-public:
- inline InstructionSelection(TargetMachine &T) : Target(T) {}
- const char *getPassName() const { return "Sparc Instruction Selection"; }
-
- bool runOnFunction(Function &F) {
- if (SelectInstructionsForMethod(&F, Target)) {
- cerr << "Instr selection failed for function " << F.getName() << "\n";
- abort();
- }
- return false;
- }
-};
-
-
struct FreeMachineCodeForFunction : public FunctionPass {
const char *getPassName() const { return "Sparc FreeMachineCodeForFunction"; }
@@ -184,7 +167,7 @@ void UltraSparc::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) {
// Construct and initialize the MachineCodeForMethod object for this fn.
PM.add(new ConstructMachineCodeForFunction(*this));
- PM.add(new InstructionSelection(*this));
+ PM.add(createInstructionSelectionPass(*this));
PM.add(createInstructionSchedulingWithSSAPass(*this));
OpenPOWER on IntegriCloud