JIT should print LLVM each function before selecting instructions for it.
authorBrian Gaeke <gaeke@uiuc.edu>
Sat, 11 Dec 2004 18:41:09 +0000 (18:41 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Sat, 11 Dec 2004 18:41:09 +0000 (18:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18803 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcTargetMachine.cpp
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());
   
   // 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.
   PM.add(createSparcV8SimpleInstructionSelector(TM));
 
   // Print machine instructions as they were initially generated.
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());
   
   // 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.
   PM.add(createSparcV8SimpleInstructionSelector(TM));
 
   // Print machine instructions as they were initially generated.