Bools are *also* not ints. Sigh. Furthermore, most of the TargetMachine
authorBrian Gaeke <gaeke@uiuc.edu>
Sat, 11 Dec 2004 05:19:04 +0000 (05:19 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Sat, 11 Dec 2004 05:19:04 +0000 (05:19 +0000)
ctor parameters can be defaulted.

Print the transformed llvm code input to the instruction selector
when -print-machineinstrs is on, just like V9.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18794 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcTargetMachine.cpp
lib/Target/SparcV8/SparcV8TargetMachine.cpp

index 065dc2dfac5fa503d43b79e447b15856f6c2ed0a..8e55185f899a6bfb2138a649f5bef81b3e3ef3af 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "SparcV8TargetMachine.h"
 #include "SparcV8.h"
+#include "llvm/Assembly/PrintModulePass.h"
 #include "llvm/Module.h"
 #include "llvm/PassManager.h"
 #include "llvm/CodeGen/MachineFunction.h"
@@ -31,7 +32,7 @@ namespace {
 ///
 SparcV8TargetMachine::SparcV8TargetMachine(const Module &M,
                                            IntrinsicLowering *IL)
-  : TargetMachine("SparcV8", IL, false, 4, 4, 8, 4, 8, 4, 2, 1, 4),
+  : TargetMachine("SparcV8", IL, false, 4, 4),
     FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0), JITInfo(*this) {
 }
 
@@ -78,6 +79,10 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &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 PrintModulePass());
   
   PM.add(createSparcV8SimpleInstructionSelector(*this));
 
index 065dc2dfac5fa503d43b79e447b15856f6c2ed0a..8e55185f899a6bfb2138a649f5bef81b3e3ef3af 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "SparcV8TargetMachine.h"
 #include "SparcV8.h"
+#include "llvm/Assembly/PrintModulePass.h"
 #include "llvm/Module.h"
 #include "llvm/PassManager.h"
 #include "llvm/CodeGen/MachineFunction.h"
@@ -31,7 +32,7 @@ namespace {
 ///
 SparcV8TargetMachine::SparcV8TargetMachine(const Module &M,
                                            IntrinsicLowering *IL)
-  : TargetMachine("SparcV8", IL, false, 4, 4, 8, 4, 8, 4, 2, 1, 4),
+  : TargetMachine("SparcV8", IL, false, 4, 4),
     FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0), JITInfo(*this) {
 }
 
@@ -78,6 +79,10 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &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 PrintModulePass());
   
   PM.add(createSparcV8SimpleInstructionSelector(*this));