search for: m_modul

Displaying 10 results from an estimated 10 matches for "m_modul".

Did you mean: m_module
2018 May 11
2
About Error: Interpreter has not been linked in
Hello, When I try to create execution engine I do get "*Interpreter has not been linked in.*" error and EngineBuilder returns NULL. Here is the line I use to create execution engine: auto executionEngine = llvm::EngineBuilder(std::move(m_module)).setErrorStr(&error).create(); Here are all headers I have included: #include "llvm/ADT/STLExtras.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/GenericValue.h" #include "llvm/IR/Argument.h" #include "llvm/IR/...
2002 Oct 11
2
[LLVMdev] Accessing a function's arguments
I am trying to generate a simple wrapper function: Function* pWrapper = m_module.getOrInsertFunction(name, FunctionType::get(Type::VoidTy, vector<const Type*>(1, PointerType::get(Type::IntTy)), false)); How do I actually get the Value* for the one argument to this function? The pWrapper->getArgumentList().size() is 0. Shouldn't the argument list cont...
2018 May 11
0
About Error: Interpreter has not been linked in
...wrote: > Hello, > > When I try to create execution engine I do get "*Interpreter has not been > linked in.*" error and EngineBuilder returns NULL. > > Here is the line I use to create execution engine: > > auto executionEngine = llvm::EngineBuilder(std::move( > m_module)).setErrorStr(&error).create(); > > Here are all headers I have included: > > #include "llvm/ADT/STLExtras.h" > #include "llvm/ExecutionEngine/ExecutionEngine.h" > #include "llvm/ExecutionEngine/GenericValue.h" > #include "llvm/IR/Argumen...
2018 May 11
1
About Error: Interpreter has not been linked in
...ello, >> >> When I try to create execution engine I do get "Interpreter has not been linked in." error and EngineBuilder returns NULL. >> >> Here is the line I use to create execution engine: >> >> auto executionEngine = llvm::EngineBuilder(std::move(m_module)).setErrorStr(&error).create(); >> >> Here are all headers I have included: >> >> #include "llvm/ADT/STLExtras.h" >> #include "llvm/ExecutionEngine/ExecutionEngine.h" >> #include "llvm/ExecutionEngine/GenericValue.h" >>...
2016 Sep 14
2
setDataLayout segfault
Ok. I can make a copy of the unique_ptr before moving it into the builder's constructor and use the copy later on. It is confusing to require a unique_ptr. Frank On 09/14/2016 12:11 PM, Frank Winter via llvm-dev wrote: > I am constructing the engine builder in the following way: > > llvm::SMDiagnostic Err; > unique_ptr<Module> Mod = getLazyIRFileModule("f.ll",
2002 Oct 11
0
[LLVMdev] Accessing a function's arguments
Just a followup for the archives ... > I am trying to generate a simple wrapper function: > > Function* pWrapper = m_module.getOrInsertFunction(name, > FunctionType::get(Type::VoidTy, > vector<const Type*>(1, PointerType::get(Type::IntTy)), false)); > > How do I actually get the Value* for the one argument to this function? > The pWrapper->getArgumentList().size() is 0. Shouldn't...
2008 Feb 11
2
[LLVMdev] exception handling broken on x86-64?
Hello Evan and Dale, > Shootout-C++/except works for me. Anton suggests there may be an > issue with the unwinding libraries and he may be right, I'll look at > it with you tomorrow. Yes. Please be sure, that you're linking with system libgcc.{so,dylib}, not with llvm-compiled one. -- WBR, Anton Korobeynikov
2008 Mar 15
1
[LLVMdev] exception handling broken on x86-64?
...g copy of llvm, I tried calling a JITted function that calls an external function that throws: thrower.cpp: (which gets compiled into a dynamic library) extern "C" void throwexception() { throw 5; } My code that invokes the JIT: llvm::Function *q_main = implementationVisitor.m_module- >getFunction("q_main"); std::vector<GenericValue> args; try { GenericValue GV=EE->runFunction(q_main, args); } catch (...) { printf("hello!\n"); } } And instead of printing out hello I got Program received signal SIGABRT, Abo...
2017 Apr 08
2
Getting a pointer to a i8 from a global variable that holds a constant string
...I'm stuck on the parameter part of the call instruction. So far I have something like this: const std::string& str = strExpr->value(); llvm::ArrayType* type = llvm::ArrayType::get(llvm::IntegerType::get(m_context, 8), str.size()+1); llvm::GlobalVariable* var = new llvm::GlobalVariable(m_module, type, true, llvm::GlobalValue::PrivateLinkage, nullptr, ".str"); var->setAlignment(1);; llvm::Constant* c = llvm::ConstantDataArray::getString(m_context, str); var->setInitializer(c); The part below is the one I have problems with: llvm::ConstantInt* const_int32_12 = llvm::Cons...
2010 Jun 25
3
[LLVMdev] Why code doesn't speed up much with optimization level increase?
I run large piece of code in JIT and it runs only marginallty faster with optimization levels 1,2,3. I think differences are within the margin or error. level user time 0 17339ms 1 16913ms 2 16891ms 3 16898ms Level is set with builder->setOptLevel(olev); Compilation time is excluded by taking the only top-level function address before the run