JIT should print LLVM each function before selecting instructions for it.
[oota-llvm.git] / lib / Target / SparcV8 / SparcV8TargetMachine.cpp
index 8e55185f899a6bfb2138a649f5bef81b3e3ef3af..8059853bc21f5541ab181b077d824624a5a51633 100644 (file)
@@ -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.