similar to: [LLVMdev] having troubles mixing ExecutionEngine::runStaticConstructorsDestructors() and Linker::LinkModules()

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] having troubles mixing ExecutionEngine::runStaticConstructorsDestructors() and Linker::LinkModules()"

2011 Sep 09
0
[LLVMdev] runStaticConstructorsDestructors not calling static destructors
On Fri, Sep 9, 2011 at 1:36 PM, Graham Wakefield <wakefield at mat.ucsb.edu> wrote: > Hi there, > > I'm having trouble getting ExecutionEngine->runStaticConstructorsDestructors(module, true) to actually trigger static destructors in my code. The static constructors however do get called. > > I don't know if this is an LLVM or Clang issue, from looking at the IR (see
2013 Oct 19
2
[LLVMdev] An enhancement for MCJIT::getFunctionAddress
In MCJIT, the old JIT functions are deprecated in favor of getFunctionAddress. Code like: llvm::Function *F = M->getFunction(FuncName); void *FN = EE->getPointerToFunction(F); should be rewritten as uint64_t FN = EE->getFunctionAddress(FuncName); While functionally identical, in case the correct module is known the new version will be much slower, linear with the number of added
2013 Oct 21
0
[LLVMdev] An enhancement for MCJIT::getFunctionAddress
I should have read this before sending my previous reply. :-) I'm not a big fan of default parameters, but some form of what you are suggesting may be useful. See my other comments on this topic in the other reply. -Andy From: Yaron Keren [mailto:yaron.keren at gmail.com] Sent: Saturday, October 19, 2013 3:17 PM To: Kaylor, Andrew; <llvmdev at cs.uiuc.edu> Subject: An enhancement
2011 Sep 09
3
[LLVMdev] runStaticConstructorsDestructors not calling static destructors
Hi there, I'm having trouble getting ExecutionEngine->runStaticConstructorsDestructors(module, true) to actually trigger static destructors in my code. The static constructors however do get called. I don't know if this is an LLVM or Clang issue, from looking at the IR (see below) it looks like the destructor is being tied to cxa_atexit, and I wonder if that is not called by
2013 Oct 21
2
[LLVMdev] An enhancement for MCJIT::getFunctionAddress
The search is linear? If that’s really true, we should fix that. On Oct 21, 2013, at 10:14 AM, Kaylor, Andrew <andrew.kaylor at intel.com> wrote: > I should have read this before sending my previous reply. :-) > > I’m not a big fan of default parameters, but some form of what you are suggesting may be useful. See my other comments on this topic in the other reply. > >
2013 Oct 21
0
[LLVMdev] An enhancement for MCJIT::getFunctionAddress
There's probably a lot that we could do, but I can't think of anything easy. Basically every time we need to look up a symbol by name we're going to each module and saying "Do you have this symbol?" It would likely be much better if we grabbed the function names from the module and did the search ourselves so that we could keep some information about the things that
2012 Dec 17
1
[LLVMdev] Execution Engine issue with composite module
Hi, I'm having an issue with the below modules. I build module X, then module Y (which has a dependency on X). I've added an external declaration on module Y of the functions defined in X. i also link the except-handling module, but i think it is peripheral to the issue i like all the modules together in a single module called executableModule. I link them with the method:
2013 Oct 22
2
[LLVMdev] An enhancement for MCJIT::getFunctionAddress
I don’t follow. Why are we looking at the module at all? That query should work even (especially) after the Module is deleted. We should be able to have a local symbol table that’s a DenseMap or something similar to resolve from names to target addresses. That map would be updated as part of the compilation when the object’s symbol table gets read. -Jim On Oct 21, 2013, at 4:55 PM, Kaylor,
2013 Oct 22
0
[LLVMdev] An enhancement for MCJIT::getFunctionAddress
Hi Jim, Clearly searching for name should not be linear in modules but with a map of some kind. After compilation to IR each module has a StringMap symbol table. After compiling to MC and loading the object file, the dynamic linker has a StringMap symbol table for all loaded modules. In the usual use case you'll load module(s) into MCJIT and then compile / link them and all is well, no
2013 Oct 22
1
[LLVMdev] SmallPtrSet patch for MCJIT
Hi Andy, I added the runStaticConstructorsDestructors and FindFunctionNamed functions. This also required making them virtual in EE.h. I'm not sure about FindFunctionNamed: In addition to searching finalized modules, should it search Added and Loaded modules? If it finds a Function in these, should it compile and finalize it before returning the Function* ? I modified the implementation
2010 Jan 29
2
[LLVMdev] Redefining function
Hi everybody. I've just started learning about LLVM and didn't get too far studying the core. I couldn't find the solution to my problem (if it has one) in the mailing list or the source code. The problem is: how can I redefine a function that's been called already by some other function? Suppose I have 3 files, all compiled to bytecode through llvm-gcc (I think it could be clang
2012 Jul 07
2
[LLVMdev] Crash using the JIT on x86 but work on x64
Hello everyone, i’m using LLVM (updated to 3.1 after seeing that bug, but it’s the same with 3.0) for running a bitcode on a C++ program, and Clang for compiling it. My code work perfectly, as expected on x64, but crash on x86. I’m on Windows 7 x64 and LLVM + Clang was compiled using Visual Studio 2010 (tested in both Release and Debug build). Project was make using CMake. Here is my code:
2012 Feb 19
1
[LLVMdev] LinkModules triple/datatype mismatch warnings a bit strict?
Hi, I'm fairly new at poking around in llvm internals so if you find misconceptions / problems with the below let me know, this is just how I've understood this so far. When doing a build which uses functionality from LinkModules to combine bitcode from different versions of LLVM, or between LLVM-GCC (I know) and Clang, I've noticed that multiple warnings which sometimes seem
2018 Jun 14
3
runStaticConstructorsDestructors() causes crash on exit
Greetings, LLVM wizards. I am using clang to compile a C++ module, and an ExecutionEngine (MCJIT) to execute a function it defines. That works (or pretends to). However, if I call the module's constructors first: exec_engine->runStaticConstructorsDestructors(false); exec_engine->runFunctionAsMain(function, argvec, NULL); execution still works, but my program crashes when it exits, in
2010 Nov 02
1
[LLVMdev] Forcing the Interpreter segfaults
Hi everyone ! I am very new to LLVM and intent to use it in a research project. I have a problem with the interpreter: I have a simple compiler that generates LLVM bitcode, JIT it and execute it, and it works very well. Now I would like to execute it using the interpreter. And I get a segfault. Here is the code : // This code JIT the function and executes it llvm::InitializeNativeTarget();
2018 Jun 19
2
runStaticConstructorsDestructors() causes crash on exit
On Alex's advice I am switching from MCJIT to the Orc API to compile and execute functions. Starting from the new clang-interpreter example in the source code (top of the tree!), I am able to execute my functions all right... as long as there are no constructors and destructors to call. My question: is there a simple way, with the Orc API, to run a module's constructors and destructors? I
2010 Mar 01
0
[LLVMdev] 2nd attempt for a working patch for bug 2606
Hi Jeffrey, I'm still in the process of learning the unittest technology. While I did get distracted with test-suite and test, and therefore the requisite installs of llvm-gcc, and DejaGNU, I think I'm back on track now. So that was a waste of time. By the way the reference I have to the unittests target was in an archive for this list. Is there no llvm level doc for this? Regardless the
2009 Nov 19
0
[LLVMdev] fastcc and ExecutionEngine::getPointerToFunction()
----- Original Message ---- > From: OvermindDL1 <overminddl1 at gmail.com> > To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu> > Sent: Thu, November 19, 2009 6:12:47 AM > Subject: Re: [LLVMdev] fastcc and ExecutionEngine::getPointerToFunction() > > Er... Sending this to the list instead of the parent... > > On Thu, Nov 19, 2009 at 4:49 AM, Hans
2009 Nov 20
0
[LLVMdev] fastcc and ExecutionEngine::getPointerToFunction()
Hans Wennborg wrote: > Yesterday I realised that if a Function has the calling convention set > to "fast", then it is a bad idea to call it through the function pointer > one gets from ExecutionEngine::getPointerToFunction(). > > The problem is that when calling it from my C++ program, the call will > be made C-style, while the function expects to be called the fastcc
2010 Feb 27
2
[LLVMdev] 2nd attempt for a working patch for bug 2606
On Fri, Feb 26, 2010 at 1:26 PM, Garrison Venn <gvenn.cfe.dev at gmail.com> wrote: > Hi Jeffrey, > On Feb 26, 2010, at 16:02, Jeffrey Yasskin wrote: > > [sidenote: Please try to avoid extraneous whitespace and line wrapping > changes in your patches. It makes it harder to see what you're actually > changing] > > Sorry just saw some preexisting code was not in 80