search for: seterrorstr

Displaying 20 results from an estimated 89 matches for "seterrorstr".

2010 Jan 23
2
[LLVMdev] Kaleidoscope-tutorial: Fails to create the JIT
...ExecutionEngine === NULL, >> Which result's in a null-pointer for "TheExecutionEngine"; which >> explains the bus-errror .. Reid Kleckner wrote: > Try changing the above line to: > std::string str; > TheExecutionEngine = > EngineBuilder(OurModuleProvider).setErrorStr(str).create(); > cout << str << '\n'; > > This interface should set str to an appropriate error message if it > returns NULL. I tried this, assuming that line should be || TheExecutionEngine = EngineBuilder(TheModule).setErrorStr(&str).create(); ------------...
2015 May 11
4
[LLVMdev] Set up ExecutionEngine according to actual machine capabilities
I am currently setting up my Module with module->setTargetTriple(llvm::sys::getProcessTriple() #ifdef _WIN32 + "-elf" #endif ); And my ExecutionEngine with llvm::EngineBuilder(std::move(module)) .setErrorStr(&err) .setMCPU(llvm::sys::getHostCPUName()) .create() This works fine on most machines, however on some virtualized machines this fails because the host CPU name implies AVX, however AVX is in fact di...
2018 Apr 19
2
How to set Target/Triple of ExecutionEngine
...issue where a struct `{i8,i64}` is not 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() );...
2010 Jan 23
0
[LLVMdev] Kaleidoscope-tutorial: Fails to create the JIT
...gt;> Which result's in a null-pointer for "TheExecutionEngine"; which >>> explains the bus-errror .. > > Reid Kleckner wrote: >> Try changing the above line to: >> std::string str; >> TheExecutionEngine = >> EngineBuilder(OurModuleProvider).setErrorStr(str).create(); >> cout << str << '\n'; >> >> This interface should set str to an appropriate error message if it >> returns NULL. > > I tried this, assuming that line should be > || TheExecutionEngine = > EngineBuilder(TheModule).setError...
2010 Jan 22
0
[LLVMdev] Kaleidoscope-tutorial: Fails to create the JIT
...t", getGlobalContext()); >  ||  //GAM: check TheModule: it's a valid pointer >  || >  ||  // create the JIT. >  || TheExecutionEngine = EngineBuilder(TheModule).create(); Try changing the above line to: std::string str; TheExecutionEngine = EngineBuilder(OurModuleProvider).setErrorStr(str).create(); cout << str << '\n'; This interface should set str to an appropriate error message if it returns NULL. Reid
2012 May 09
2
[LLVMdev] Null pointer dereference
Hi all, Writing my own LLVM client I've noticed a potential null pointer dereference in EngineBuilder::selectTarget. The class has an optional pointer to the ErrorStr, which can be initialzied through setErrorStr() method. Although, it's strictly optional, selectTarget doesn't verify its value before assignment. Please find patch for branch release_31, revision 155051 attached. - Yury -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermai...
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 gd...
2018 Apr 19
1
How to set Target/Triple of ExecutionEngine
...ht need to set your TargetOptions before 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 in...
2018 Apr 19
0
How to set Target/Triple of ExecutionEngine
...> 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->setDat...
2016 Sep 14
4
setDataLayout segfault
..."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 *targetMachine = engineBuilder.selectTarget(); assert(targetMachine && "failed to create target...
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/BasicBlock.h&qu...
2010 Jan 23
2
[LLVMdev] Kaleidoscope-tutorial: Fails to create the JIT
...s in a null-pointer for "TheExecutionEngine"; which >>>> explains the bus-errror .. >> >> Reid Kleckner wrote: >>> Try changing the above line to: >>> std::string str; >>> TheExecutionEngine = >>> EngineBuilder(OurModuleProvider).setErrorStr(str).create(); >>> cout << str << '\n'; >>> >>> This interface should set str to an appropriate error message if it >>> returns NULL. >> >> I tried this, assuming that line should be >> || TheExecutionEngine = >> Engin...
2010 Jan 22
3
[LLVMdev] Kaleidoscope-tutorial: Fails to create the JIT
Hello All I 'm studing LLVM/Clang and trying to follow the Kaleidoscope tutorial (Release 2.6 version). I found some minir docu-bugs and added them to Bugzilla. However, Now I found a show-stopper for me, the toy (v4) demo does build, but does crash, on any input. Even a simpe ';'! Looking into the (demo-code) found the that the JIT can't be build/ created,/loaded/... Which
2010 Aug 12
1
[LLVMdev] error when trying to create a JIT execution engine "Interpreter has not been linked in"
I've been following this guide: http://llvm.org/docs/tutorial/LangImpl4.html and am getting an error when trying to create an execution engine. When running this code: executionEngine = llvm::EngineBuilder(module).setErrorStr(&errStr).create(); errStr contains: "Interpreter has not been linked in." I'm using this command to build: g++ -g errors.o lexer.o parser.o lang.o main.o -rdynamic `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o llvm-lisp (my whole Makefile: http://pastebin.com/...
2011 Jan 12
2
[LLVMdev] using llvm as library from xcode project?
...t. The /usr/local/lib directory has a bunch of .a files. This page (http://llvm.org/docs/Projects.html) suggests that I need to learn about the LLVM build system. If so, why? I tried simply adding all the .a files in /usr/local/lib, but my programs fails at: engine = EngineBuilder(module).setErrorStr(&err).create(); The 'engine' is null, and 'err' is "Interpreter has not been linked in.". thanks, Rob
2012 May 09
0
[LLVMdev] Null pointer dereference
...Regards, -Jim On May 9, 2012, at 3:40 PM, Yury Mikhaylov wrote: > Hi all, > > Writing my own LLVM client I've noticed a potential null pointer dereference in EngineBuilder::selectTarget. > > The class has an optional pointer to the ErrorStr, which can be initialzied through setErrorStr() method. Although, it's strictly optional, selectTarget doesn't verify its value before assignment. > > Please find patch for branch release_31, revision 155051 attached. > > - Yury > > <TargetSelect.patch>_______________________________________________ > LLVM...
2012 May 09
1
[LLVMdev] Null pointer dereference
...:40 PM, Yury Mikhaylov wrote: > > > Hi all, > > > > Writing my own LLVM client I've noticed a potential null pointer > dereference in EngineBuilder::selectTarget. > > > > The class has an optional pointer to the ErrorStr, which can be > initialzied through setErrorStr() method. Although, it's strictly optional, > selectTarget doesn't verify its value before assignment. > > > > Please find patch for branch release_31, revision 155051 attached. > > > > - Yury > > > > <TargetSelect.patch>_________________________...
2012 Dec 23
1
[LLVMdev] Missing ExecutionEngine EngineKind::MCJIT ?
...ngine/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 context: http://llvm.1065342.n5...
2013 Jan 09
1
[LLVMdev] ExecutionEngine always comes back NULL
Hi Rick, you are right! But can you call this method EngineBuilder::setErrorStr to get creation error? Cheers, Manuele Il 08/01/2013 20:27, Rick Mann ha scritto: > On Jan 8, 2013, at 8:09 , Manuele Conti <manuele.conti at sirius-es.it> wrote: > >> Sorry I forgot to add code that I use to run code: >> /* Executes the AST by running the main function *...
2012 May 14
2
[LLVMdev] MCJIT
...lling setUseMCJIT(true) after having already called create()? Can you step through EngineBuilder::create() and see what's happening there? > > -Jim lli.cpp instantiates the builder, sets options/flags etc and then calls create(). In my driver, I have: > llvm::EngineBuilder(m_LLVMMod).setErrorStr(&engErr).setUseMCJIT(true).create(); which is what you mentioned. I'll step through create() and check whats happening. thanks, ashok