search for: setenginekind

Displaying 20 results from an estimated 74 matches for "setenginekind".

2012 Nov 13
0
[LLVMdev] EngineBuilder::setEngineKind(EngineKind::Interpreter) error
I'm tinkering with various EngineBuilder parameters to see their effect on performance. If I do call EngineBuilder::setEngineKind() with "Interpreter", I get an "Interpreter has not been linked in" error message. If I don't call setEngineKind() at all, my code works. Note that I am calling InitializeNativeTarget() beforehand. How can I try out the interpreter? - Paul
2018 Apr 19
2
How to set Target/Triple of ExecutionEngine
...ot getting the same layout as the ABI expects. I setup my engine/module like this:      llvm::SmallVector<std::string,2> mattrs;      llvm::EngineBuilder builder{ unique_ptr<llvm::Module>(module) };      llvm::ExecutionEngine * ee = builder.         setErrorStr( &errStr ).         setEngineKind( llvm::EngineKind::JIT ).         setTargetOptions( topts ).         create(builder.selectTarget( llvm::Triple(llvm::Triple::normalize(platform::target->triple)), "", "", mattrs ));     module->setDataLayout( ee->getDataLayout() ); Where `module` is my `llvm::Module`...
2012 Dec 23
1
[LLVMdev] Missing ExecutionEngine EngineKind::MCJIT ?
...+ #include <llvm/ExecutionEngine/MCJIT.h> - #include <llvm/ExecutionEngine/JIT.h> + llvm_map_components_to_libraries(REQ_LLVM_LIBRARIES mcjit native) - llvm_map_components_to_libraries(REQ_LLVM_LIBRARIES jit native) However the following call now returns NULL: EngineBuilder(TheModule).setEngineKind(EngineKind::JIT).setErrorStr(&error).create(); There doesn't appear to be an EngineKind::MCJIT option. Am I missing something? Should EDSL authors stick to the old JIT for now? Is this a patch a relative LLVM novice like myself could contribute? Thanks! -Josh -- View this message in co...
2016 Jun 11
3
SegFault creating a ExecutionEngine
My code to create an ExecutionEngine is segfaulting: std::string errStr; llvm::ExecutionEngine * ee = llvm::EngineBuilder( unique_ptr<llvm::Module>(module) ) .setErrorStr( &errStr ) //line 1618 .setEngineKind( llvm::EngineKind::JIT ) Where module is a `llvm::Module*`. This is code I'm migrating from 3.3 to 3.8. Since the deletion error is happening during constructor I'm at a bit of a loss as to what I'm doing wrong. The stack trace from gdb is: #0 0x00007ffff1195a02 in llvm::SmallPtrSet...
2018 Apr 19
1
How to set Target/Triple of ExecutionEngine
...fore calling selectTarget. E.g. builder.setTargetOptions(Opts).selectTarget(...); Or you could just let EngineBuilder call selectTarget for you (which is what the no-argument version of EngineBuilder::create does): llvm::ExecutionEngine * ee = builder. setErrorStr( &errStr ). setEngineKind( llvm::EngineKind::JIT ). setTargetOptions( topts ). setMArch(arch). setMAttrs(mattrs). create(); If those are still failing, it would be interesting to get the data layout string that you are getting from the ExecutionEngine instance and compare it to what you are...
2013 Jul 18
2
[LLVMdev] LLVM 3.3 JIT code speed
...LVM 3.3 JIT, compared to what we had with LLVM 3.1. What could be the reason? I tried to play with TargetOptions without any success… Here is the kind of code we use to allocate the JIT: EngineBuilder builder(fResult->fModule); builder.setOptLevel(CodeGenOpt::Aggressive); builder.setEngineKind(EngineKind::JIT); builder.setUseMCJIT(true); builder.setCodeModel(CodeModel::JITDefault); builder.setMCPU(llvm::sys::getHostCPUName()); TargetOptions targetOptions; targetOptions.NoFramePointerElim = true; targetOptions.LessPreciseFPMADOption = true; targetOptions.U...
2018 Apr 19
0
How to set Target/Triple of ExecutionEngine
...expects. > > I setup my engine/module like this: > >      llvm::SmallVector<std::string,2> mattrs; >      llvm::EngineBuilder builder{ unique_ptr<llvm::Module>(module) }; >      llvm::ExecutionEngine * ee = builder. >         setErrorStr( &errStr ). >         setEngineKind( llvm::EngineKind::JIT ). >         setTargetOptions( topts ). >         create(builder.selectTarget( > llvm::Triple(llvm::Triple::normalize(platform::target->triple)), "", "", > mattrs )); > >     module->setDataLayout( ee->getDataLayout() ); > &gt...
2016 Feb 05
4
MCJit Runtine Performance
Hi Morten, Something else just occurred to me: can you share your EngineBuilder configuration lines? (http://llvm.org/docs/doxygen/html/classllvm_1_1EngineBuilder.html) In particular - are you explicitly setting the optimization level? The old JIT may have had a different default. - Lang. Sent from my iPad > On Feb 4, 2016, at 10:54 PM, Jim Grosbach via llvm-dev <llvm-dev at
2010 Mar 18
2
[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?
Hello I have the following scenario, and I am not sure why the performance is so bad (take 30 minutes to complete with very simple generated functions): 1. Create module 2. Do something like EE = EngineBuilder(theModule).setEngineKind(EngineKind::JIT).create(); 3. Create a function in the module: theModule->getOrInsertFunction(..) 4. Execute 1000 times the function using EE->runFunction(function, args) with different args in each round. My question - Does section 4 above makes the EE recompile the function 1000 times? I...
2016 Sep 14
4
setDataLayout segfault
...{ llvm::InitializeNativeTarget(); llvm::LLVMContext TheContext; unique_ptr<Module> Mod(new Module("A",TheContext)); llvm::EngineBuilder engineBuilder(std::move(Mod)); std::string mcjit_error; engineBuilder.setMCPU(llvm::sys::getHostCPUName()); engineBuilder.setEngineKind(llvm::EngineKind::JIT); engineBuilder.setOptLevel(llvm::CodeGenOpt::Aggressive); engineBuilder.setErrorStr(&mcjit_error); llvm::TargetOptions targetOptions; targetOptions.AllowFPOpFusion = llvm::FPOpFusion::Fast; engineBuilder.setTargetOptions( targetOptions ); TargetMachine...
2010 Feb 11
2
[LLVMdev] LLVM memory usage?
...e_name) { MemoryBuffer *buffer = MemoryBuffer::getFile(bitcode_name, &error_message); ModuleProvider *mp = getBitcodeModuleProvider(buffer, getGlobalContext(), &error_message); if( first_time ) { InitializeNativeTarget(); builder = new EngineBuilder(mp); builder->setEngineKind(EngineKind::JIT); CodeGenOpt::Level opt_level = CodeGenOpt::Default; builder->setOptLevel(opt_level); execution_engine = builder->create(); delete(builder); // lli doesn't do this - is it safe? } Module *module = mp->materializeModule(&error_messa...
2012 Aug 07
1
[LLVMdev] Target does not support MC emission
With the following call: llvm::ExecutionEngine* engine; llvm::EngineBuilder builder( module ); builder.setEngineKind( llvm::EngineKind::Either ); // it will use JIT if available builder.setUseMCJIT ( true ); engine = builder.create(); These calls are successful in windows. But when I try in Linux (Ubuntu), the create() function fails with the error message: Target does not support MC emission Any ideas why and...
2012 Dec 21
2
[LLVMdev] How to print machine code of JIT IR
Hi, I am using LLVM 3.1, and wants to print the machine code of JIT IR I try the following method EngineBuilder builder(&ctx.getModule()); builder.setEngineKind(EngineKind::JIT); * TargetMachine * tm = builder.selectTarget(); tm->Options.PrintMachineCode = true;* engine = builder.create(); and somewhere in my code, I use runJITonFunction(); Another question is that I am not sure when JIT would dump machine code. Does anyone know how to d...
2013 May 21
0
[LLVMdev] Static linking of execution engine
Yeah, this is a problem with the static constructor getting optimized out. Including "JIT.h" is supposed to fix that. Is it possible that the file where you are including "JIT.h" doesn't have any required code in it? -Andy -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Mario Schwalbe Sent: Tuesday,
2013 May 22
2
[LLVMdev] Static linking of execution engine
...ude <llvm/LLVMContext.h> #include <llvm/Module.h> #include <cassert> using namespace llvm; int main(void) { InitializeNativeTarget(); #if 1 LLVMLinkInJIT(); #endif EngineBuilder engineBuilder(new Module("foo", getGlobalContext())); #if 0 engineBuilder.setEngineKind(EngineKind::Interpreter); #else engineBuilder.setEngineKind(EngineKind::JIT); #endif const OwningPtr<ExecutionEngine> executionEngine(engineBuilder.create()); assert(executionEngine && "Failed to create execution engine"); return 0; }
2013 Nov 07
1
[LLVMdev] Is $ not allowed in names?
On 07/11/13 16:20, Óscar Fuentes wrote: > You are using MCJIT, aren't you? I'm using the JIT created by "EngineBuilder.setEngineKind( EngineKind::JIT )". Is that MCJIT? > `$' is a valid character on LLVM. However, MCJIT adds the naming > restrictions imposed by the object file spec it uses (ELF, IIRC). Which > is something quite nasty to do for a JIT engine, IMO. I thought $ was a safe character on my platfor...
2012 Dec 17
1
[LLVMdev] Execution Engine issue with composite module
...rveSource, &errorMsg); i call llvm::verifyModule(* executableModule, llvm::AbortProcessAction, &err); which doesn't seem to find anything wrong with the linked module. then i proceed to create the executionEngine: llvm::EngineBuilder eB(executableModule); eB.setEngineKind(llvm::EngineKind::JIT); llvmEngine = eB.create(); which seems to go well, but as soon as i run: llvm::Function* foo2 = moduleX->getFunction("foo2"); engine->getPointerToFunction(foo2); i get the error: LLVM ERROR: Program used external function...
2013 May 21
2
[LLVMdev] Static linking of execution engine
Hi, I'm on Linux and trying to link an application that makes use of LLVM's JIT execution engine statically. Setup: (1) LLVM libs are compiled as static libraries. (2) Called InitializeNativeTarget(). (3) Included llvm/ExecutionEngine/JIT.h. It works if I build and link regularly. However, if I add -static when linking, the execution engine fails to initialize. Does anyone know why?
2011 Dec 29
2
[LLVMdev] How to free memory of JIT'd function
...ocess is constantly growing as the while loop goes. Could someone shed light on this please? Here is the code. int main(int argc, char **argv) { InitializeNativeTarget(); LLVMContext Context; Module *M = new Module("test", Context); ExecutionEngine* EE = llvm::EngineBuilder(M).setEngineKind(EngineKind::JIT).create(); while (true) { SMDiagnostic error; ParseAssemblyString("define i32 @factorial(i32 %X) nounwind uwtable {\n" " %1 = alloca i32, align 4\n" " %2 = alloca i32, align 4\n"...
2013 Jul 18
0
[LLVMdev] LLVM 3.3 JIT code speed
...with LLVM 3.1. What could be the reason? > > I tried to play with TargetOptions without any success… > > Here is the kind of code we use to allocate the JIT: > > EngineBuilder builder(fResult->fModule); > builder.setOptLevel(CodeGenOpt::Aggressive); > builder.setEngineKind(EngineKind::JIT); > builder.setUseMCJIT(true); > builder.setCodeModel(CodeModel::JITDefault); > builder.setMCPU(llvm::sys::getHostCPUName()); > > TargetOptions targetOptions; > targetOptions.NoFramePointerElim = true; > targetOptions.LessPreciseFPMADOpti...