Print machine code after instruction selection
authorChris Lattner <sabre@nondot.org>
Wed, 30 Oct 2002 00:47:49 +0000 (00:47 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 30 Oct 2002 00:47:49 +0000 (00:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4434 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86TargetMachine.cpp

index 4273dafefcf5eb99f4cac448ce7e5172ff60818c..50780fa61d5522af4ca4671fd25adabadd9dbc0e 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "X86TargetMachine.h"
 #include "llvm/Target/TargetMachineImpls.h"
+#include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/PassManager.h"
 #include "X86.h"
 #include <iostream>
@@ -31,6 +32,9 @@ bool X86TargetMachine::addPassesToJITCompile(PassManager &PM) {
 
   // TODO: optional optimizations go here
 
+  // Print the instruction selected machine code...
+  PM.add(createMachineFunctionPrinterPass());
+
   // Perform register allocation to convert to a concrete x86 representation
   //PM.add(createSimpleX86RegisterAllocator(*this));