aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Sparc/SparcTargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-29 00:27:00 +0000
committerChris Lattner <sabre@nondot.org>2004-02-29 00:27:00 +0000
commit1c809c594b8339fff4746c08e34914fffc3242e4 (patch)
tree65320eb7580761478b569cdbc2069c1afb47c496 /lib/Target/Sparc/SparcTargetMachine.cpp
parentda474adb2117ac1647348aa381a95c7b6e1fb524 (diff)
Add an instruction selector capable of selecting 'ret void'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc/SparcTargetMachine.cpp')
-rw-r--r--lib/Target/Sparc/SparcTargetMachine.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Target/Sparc/SparcTargetMachine.cpp b/lib/Target/Sparc/SparcTargetMachine.cpp
index 15401b103e..f9a499dca4 100644
--- a/lib/Target/Sparc/SparcTargetMachine.cpp
+++ b/lib/Target/Sparc/SparcTargetMachine.cpp
@@ -40,10 +40,19 @@ SparcV8TargetMachine::SparcV8TargetMachine(const Module &M,
///
bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM,
std::ostream &Out) {
- // <insert instruction selector passes here>
+ PM.add(createSparcV8SimpleInstructionSelector(*this));
+
+ // Print machine instructions as they are created.
+ PM.add(createMachineFunctionPrinterPass(&std::cerr));
+
PM.add(createRegisterAllocator());
PM.add(createPrologEpilogCodeInserter());
// <insert assembly code output passes here>
+
+ // This is not a correct asm writer by any means, but at least we see what we
+ // are producing.
+ PM.add(createMachineFunctionPrinterPass(&Out));
+
PM.add(createMachineCodeDeleter());
return false;
}