X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Flli%2Flli.cpp;h=a756459ecc230660ef5e90c5baa010d6e3bde01e;hb=a75ce9f5d2236d93c117e861e60e6f3f748c9555;hp=fa2de760627d764e2d0073ddd285c23e59d3eae6;hpb=46a27169104ac4cded2bd91e7f872efa80e08446;p=oota-llvm.git diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index fa2de760627..a756459ecc2 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -23,6 +23,7 @@ #include "llvm/ExecutionEngine/Interpreter.h" #include "llvm/ExecutionEngine/JIT.h" #include "llvm/ExecutionEngine/JITEventListener.h" +#include "llvm/ExecutionEngine/MCJIT.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/IRReader.h" #include "llvm/Support/ManagedStatic.h" @@ -30,8 +31,8 @@ #include "llvm/Support/PluginLoader.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/System/Process.h" -#include "llvm/System/Signals.h" +#include "llvm/Support/Process.h" +#include "llvm/Support/Signals.h" #include "llvm/Target/TargetSelect.h" #include @@ -55,6 +56,10 @@ namespace { cl::desc("Force interpretation: disable JIT"), cl::init(false)); + cl::opt UseMCJIT( + "use-mcjit", cl::desc("Enable use of the MC-based JIT (if available)"), + cl::init(false)); + // Determine optimization level. cl::opt OptLevel("O", @@ -167,6 +172,10 @@ int main(int argc, char **argv, char * const *envp) { if (!TargetTriple.empty()) Mod->setTargetTriple(Triple::normalize(TargetTriple)); + // Enable MCJIT, if desired. + if (UseMCJIT) + builder.setUseMCJIT(true); + CodeGenOpt::Level OLvl = CodeGenOpt::Default; switch (OptLevel) { default: