From 3dffa7953f1c532944931c6fd77ab02ea3af00c1 Mon Sep 17 00:00:00 2001 From: Chris Lattner <sabre@nondot.org> Date: Wed, 30 Oct 2002 00:47:49 +0000 Subject: [PATCH] Print machine code after instruction selection git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4434 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86TargetMachine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 4273dafefcf..50780fa61d5 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -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));