[llvm-commits] [llvm] r147967 - /llvm/trunk/tools/lli/lli.cpp
Jim Grosbach
grosbach at apple.com
Wed Jan 11 13:12:51 PST 2012
Author: grosbach
Date: Wed Jan 11 15:12:51 2012
New Revision: 147967
URL: http://llvm.org/viewvc/llvm-project?rev=147967&view=rev
Log:
lli should create a JIT memory manager.
Previously let the JITEmitter do it. That's rather odd, and doesn't play nice
with the MCJIT, so move the (trivial) logic up.
Modified:
llvm/trunk/tools/lli/lli.cpp
Modified: llvm/trunk/tools/lli/lli.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/lli.cpp?rev=147967&r1=147966&r2=147967&view=diff
==============================================================================
--- llvm/trunk/tools/lli/lli.cpp (original)
+++ llvm/trunk/tools/lli/lli.cpp Wed Jan 11 15:12:51 2012
@@ -23,6 +23,7 @@
#include "llvm/ExecutionEngine/Interpreter.h"
#include "llvm/ExecutionEngine/JIT.h"
#include "llvm/ExecutionEngine/JITEventListener.h"
+#include "llvm/ExecutionEngine/JITMemoryManager.h"
#include "llvm/ExecutionEngine/MCJIT.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/IRReader.h"
@@ -192,6 +193,8 @@
}
}
+ JITMemoryManager *JMM = JITMemoryManager::CreateDefaultMemManager();
+
EngineBuilder builder(Mod);
builder.setMArch(MArch);
builder.setMCPU(MCPU);
@@ -199,6 +202,7 @@
builder.setRelocationModel(RelocModel);
builder.setCodeModel(CMModel);
builder.setErrorStr(&ErrorMsg);
+ builder.setJITMemoryManager(JMM);
builder.setEngineKind(ForceInterpreter
? EngineKind::Interpreter
: EngineKind::JIT);
More information about the llvm-commits
mailing list