[llvm-commits] CVS: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Apr 13 16:30:08 PDT 2004
Changes in directory reopt/lib/LightWtProfiling:
RuntimeOptimizations.cpp updated: 1.24 -> 1.25
---
Log message:
Include MachineCodeEmitter.h and TargetData.h.
Construct a TraceOptEmitter and provide it to the machine-code emission passes.
---
Diffs of the changes: (+5 -2)
Index: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp
diff -u reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.24 reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.25
--- reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.24 Thu Apr 8 15:30:50 2004
+++ reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp Tue Apr 13 16:29:43 2004
@@ -21,11 +21,13 @@
#include "llvm/Assembly/PrintModulePass.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/Passes.h"
+#include "llvm/CodeGen/MachineCodeEmitter.h"
#include "llvm/IntrinsicLowering.h"
#include "llvm/ModuleProvider.h"
#include "llvm/PassManager.h"
#include "llvm/Target/TargetJITInfo.h"
#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetMachineImpls.h"
namespace llvm {
@@ -80,8 +82,9 @@
PM.add (createUnpackTraceFunctionPass (Target, TF));
DEBUG(PM.add (createMachineFunctionPrinterPass (&std::cerr, "After unpacking:\n")));
Target->getJITInfo ()->addPassesToJITCompile (PM);
- // FIXME: We need the JIT's MachineCodeEmitter
- // Target->addPassesToEmitMachineCode (PM, MCE);
+ const TargetData &TD = Target->getTargetData ();
+ MachineCodeEmitter *MCE = createTraceOptEmitter (TD);
+ Target->addPassesToEmitMachineCode (PM, *MCE);
PM.run (*TF->TraceFn);
// Add a branch from the entry basic block of the trace in the MatrixFn to the
More information about the llvm-commits
mailing list