From 72daaa46eb8e2835434b9a097a77d1fe93e733df Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Sat, 11 Dec 2004 18:41:09 +0000 Subject: [PATCH] JIT should print LLVM each function before selecting instructions for it. llvm-svn: 18803 --- llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp b/llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp index 8e55185f899a..8059853bc21f 100644 --- a/llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp +++ b/llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp @@ -137,6 +137,10 @@ void SparcV8JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { // FIXME: implement the select instruction in the instruction selector. PM.add(createLowerSelectPass()); + // Print LLVM code input to instruction selector: + if (PrintMachineCode) + PM.add(new PrintFunctionPass()); + PM.add(createSparcV8SimpleInstructionSelector(TM)); // Print machine instructions as they were initially generated.