aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-30 00:47:49 +0000
committerChris Lattner <sabre@nondot.org>2002-10-30 00:47:49 +0000
commit3dffa7953f1c532944931c6fd77ab02ea3af00c1 (patch)
tree583a5334023c028d5a1b55a15ed0d20810e92c49 /lib/Target/X86/X86TargetMachine.cpp
parent42c7786227bfb76734143a87ac03a78dda5235eb (diff)
Print machine code after instruction selection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--lib/Target/X86/X86TargetMachine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index 4273dafefc..50780fa61d 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));