From b1862e4d3b5fed38c17e04b4e626c8872f6b7dd5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 29 Feb 2004 00:27:00 +0000 Subject: Add an instruction selector capable of selecting 'ret void' llvm-svn: 11973 --- llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp') diff --git a/llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp b/llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp index 15401b103e6..f9a499dca43 100644 --- a/llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp +++ b/llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp @@ -40,10 +40,19 @@ SparcV8TargetMachine::SparcV8TargetMachine(const Module &M, /// bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) { - // + PM.add(createSparcV8SimpleInstructionSelector(*this)); + + // Print machine instructions as they are created. + PM.add(createMachineFunctionPrinterPass(&std::cerr)); + PM.add(createRegisterAllocator()); PM.add(createPrologEpilogCodeInserter()); // + + // 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; } -- cgit v1.2.3