search for: initializenativetarget

Displaying 20 results from an estimated 131 matches for "initializenativetarget".

2009 Oct 07
2
[LLVMdev] InitializeNativeTarget
It seems that a client application needs to call InitializeNativeTarget or LLVMInitializeNativeTarget before doing any JITting. Unfortunately, LLVMInitializeNativeTarget is defined static inline and does not appear in the .a files; thus a client not written in C or C++ trying to JIT cannot link to the library and call LLVMInitializeNativeTarget that way. It can call...
2011 Nov 24
2
[LLVMdev] LLVM 2.9 - JIT problem on Windows
...quot;. 'My' current LLVM code (see https://github.com/opencor/opencor/blob/master/src/plugins/simulation/CoreSi mulation/src/coresimulationplugin.cpp) is a shameless copy/paste of the HowToUseJIT example (in the examples folder). However, if I comment out line #67 of my code (i.e. llvm::InitializeNativeTarget();), then I don't get the aforementioned error and my LLVM code still works fine. Now, I may be wrong, but I was under the impression that a call to InitializeNativeTarget was recommended, if not compulsory, so. why commenting it out not only makes my LLVM code still work, but also prevent...
2009 Oct 07
0
[LLVMdev] InitializeNativeTarget
Kenneth Uildriks wrote: > It seems that a client application needs to call > InitializeNativeTarget or LLVMInitializeNativeTarget before doing any > JITting. Unfortunately, LLVMInitializeNativeTarget is defined static > inline and does not appear in the .a files; thus a client not written > in C or C++ trying to JIT cannot link to the library and call > LLVMInitializeNativeTarget tha...
2011 May 29
1
[LLVMdev] LLVMInitializeNativeTarget error
Hello All, I'm building an F# binding for LLVM and it seems to be working for the parts of Core and BitWriter that I've tested but I've hit problems with Target/ExecutionEngine. The following test code works with the initializeNativeTarget line commented out like so: <https://github.com/keithshep/llvm-fs/blob/b7050b841108dc703e58563a4cff8845603c950d/test/simpletest2.fs> ... but if I uncomment the initializeNativeTarget line I get the following error from mono: Unhandled Exception: System.EntryPointNotFoundException: LLVMInit...
2011 Nov 25
2
[LLVMdev] LLVM 2.9 - JIT problem on Windows
> > Now, I may be wrong, but I was under the impression that a call to > > InitializeNativeTarget was recommended, if not compulsory, so. why > > commenting it out not only makes my LLVM code still work, but also > > prevent my application from generating the above error.?! > > My bet is that your code is writing through a stray pointer. By removing the > call to Initializ...
2009 Oct 07
1
[LLVMdev] InitializeNativeTarget
On Wed, Oct 7, 2009 at 11:36 AM, Albert Graef <Dr.Graef at t-online.de> wrote: > Kenneth Uildriks wrote: > > Yes, so you'll need to add a little C++ module to your wrapper that does > the necessary initializations and is callable from your target language. That's odd, we don't need to do that for ocaml. Have you tried having a function like this defined in your
2011 Nov 24
0
[LLVMdev] LLVM 2.9 - JIT problem on Windows
...39; current LLVM code (see > https://github.com/opencor/opencor/blob/master/src/plugins/simulation/CoreSi > mulation/src/coresimulationplugin.cpp) is a shameless copy/paste of the > HowToUseJIT example (in the examples folder). However, if I comment out line > #67 of my code (i.e. llvm::InitializeNativeTarget();), then I don't get the > aforementioned error and my LLVM code still works fine. > > > > Now, I may be wrong, but I was under the impression that a call to > InitializeNativeTarget was recommended, if not compulsory, so. why > commenting it out not only makes my LLVM c...
2009 Jun 17
10
[LLVMdev] Segmentation fault - Kaleidoscope
...e jit native` -o bug > > I noticed something very recently changed w.r.t. the way LLVM's > libraries are built (no more .o files). Could this have something to > with it? I *just* changed this. :) For JIT applications, please include llvm/Target/TargetSelect.h and call the llvm::InitializeNativeTarget() function before creating an EE. -Chris
2009 Jun 17
1
[LLVMdev] Undocumented API changes
Hi, Why are there so many undocumented (and as I far I can see) unnecessary API changes? Recently there has been: 1. For JIT applications, please include llvm/Target/TargetSelect.h and call the llvm::InitializeNativeTarget() function before creating an EE. 2. The major CHANGE is: the JIT will no longer be safe for executing threaded applications without first invoking llvm_start_multithreaded(). Please begin to update your client applications now if this affects you, as I will be throwing the switch in SVN soon...
2011 Nov 25
0
[LLVMdev] LLVM 2.9 - JIT problem on Windows
> > > Now, I may be wrong, but I was under the impression that a call to > > > InitializeNativeTarget was recommended, if not compulsory, so. why > > > commenting it out not only makes my LLVM code still work, but also > > > prevent my application from generating the above error.?! > > > > My bet is that your code is writing through a stray pointer. By > > removi...
2010 Aug 18
2
[LLVMdev] clang: call extern function using JIT
...o say because you don't say what the problem is, but let's try. > Im trying to register an external function with the JIT, so can call > functions in my music > > application. > > Here my function > > int Execute(llvm::Module *Mod, char * const *envp) { > llvm::InitializeNativeTarget(); It is not necessary to call InitializeNativeTarget each time. One is enough. [snip] > llvm::FunctionType* ft = llvm::FunctionType::get(llvm::Type::getInt32Ty > > (llvm::getGlobalContext()), > std::vector<const llvm::Type*>(0, llvm::Type::getInt32Ty _______________________...
2009 Jun 17
0
[LLVMdev] Undocumented API changes
...sary > API changes? They are only seem unnecessary if you don't understand the reason they were made. We don't make change for change's sake :) > Recently there has been: > > 1. > For JIT applications, please include llvm/Target/TargetSelect.h and > call the llvm::InitializeNativeTarget() function before creating an > EE. This fixes long standing linkage problems and helps us move forward with cmake. > 2. > The major CHANGE is: the JIT will no longer be safe for executing > threaded applications without first invoking > llvm_start_multithreaded(). > Ple...
2011 Sep 02
3
[LLVMdev] LLVM: Cannot instantiate JIT execution engine
Hi, guys. Have a strange problem with LLVM in my project ( https://github.com/ababo/AntOS). Cannot instantiate JIT execution engine (NULL returns; message: Interpreter has not been linked in.). As you can see from the code I call InitializeNativeTarget. Also I tried to directly include the "llvm/ExecutionEngine/JIT.h" header, but with no success. I link with `llvm-config --ldflags --libs core jit native`, so there's no problem here. Can you suggest me anything? Thanks. -------------- next part -------------- An HTML attachment was s...
2009 Dec 12
1
[LLVMdev] Debugging a NULL return from the ExecutionEngine
...t; Hi all, I'm trying to upgrade from LLVM 2.5 -> 2.6, and when I create my >> execution engine (ExecutionEngine::create(module)) I get back a null. >> >> What's the easiest way for me to find out what went wrong? >> >> > > You probably didn't call InitializeNativeTarget and ended up with no JIT > support. > > Best regards, > --Edwin > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
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? LLVM libs are already archives. Is that supported at all? Thanks & ciao, Mario
2010 Aug 18
0
[LLVMdev] clang: call extern function using JIT
Can someone pease tell me what I am doing wrong? Im trying to register an external function with the JIT, so can call functions in my music application. Here my function int Execute(llvm::Module *Mod, char * const *envp) { llvm::InitializeNativeTarget(); std::string Error; llvm::OwningPtr<llvm::ExecutionEngine> EE( llvm::ExecutionEngine::createJIT(Mod, &Error)); if (!EE) { llvm::errs() << "unable to make execution engine: " << Error << "\n"; return 255; } // code I have added -------...
2010 Aug 17
4
[LLVMdev] clang: call extern function using JIT
hi, im creating a music application(image below). At the moment im using tcc compiler but im moving across to clang because of the improved compiler warnings. Can anyone please explain and show code so I can use clang's JIT to call functions in my application? Thanks. http://old.nabble.com/file/p29449300/51709341.jpeg -- View this message in context:
2011 Aug 25
3
[LLVMdev] Trouble using the MCJIT: "Target does not support MC emission" error
...hat the regular JIT cannot). However, I'm getting the error "Target does not support MC emission!" when I call EngineBuilder::create(). I assume that I'm just not doing something necessary for initialization, but I'm not sure what it would be--I am calling all of: llvm::InitializeNativeTarget(); llvm::InitializeAllTargetMCs(); LLVMLinkInMCJIT(); LLVMLinkInJIT(); and the module I'm trying to load does have a reasonable target: target triple = "x86_64-apple-darwin11.0.0" I've attached a short test case that has the sequence of calls that I'm making and...
2016 Sep 14
4
setDataLayout segfault
I get a segfault with this code when setting the data layout: int main(int argc, char** argv) { 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::JI...
2019 Sep 19
3
"corrupted size vs. prev_size" when calling ExecutionSession::lookup()
Hi, I wrote a compiler that generate IR code and run it on the JIT, and there randomly crashed due to "corrupted size vs. prev_size" depends on the IR code generated from the source code. Here's how I created the JIT: llvm::InitializeNativeTarget(); llvm::InitializeNativeTargetAsmPrinter(); llvm::InitializeNativeTargetAsmParser(); // create jit llvm::orc::ExecutionSession ES; llvm::orc::RTDyldObjectLinkingLayer ObjectLayer(ES, []() { return std::make_unique<llvm::SectionMemoryMa...