similar to: [LLVMdev] Cross-module function calls (code included)

Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] Cross-module function calls (code included)"

2012 Dec 14
2
[LLVMdev] StructType for dispatch_object_t changed by Linker
Duncan, thanks for your reply. > Probably the types are not defined precisely the same in each module (maybe you > could send the exact definitions in each module to the mailing list?), In the module loaded in Step 1 (otherModule): %struct.dispatch_group_s = type opaque %union.dispatch_object_t = type { %struct.dispatch_object_s* } %struct.dispatch_object_s = type opaque In the
2012 Dec 14
0
[LLVMdev] StructType for dispatch_object_t changed by Linker
Le 14 déc. 2012 à 17:08, Jaymie Strecker <jstrecker at kosada.com> a écrit : > Duncan, thanks for your reply. > >> Probably the types are not defined precisely the same in each module (maybe you >> could send the exact definitions in each module to the mailing list?), > > > In the module loaded in Step 1 (otherModule): > > %struct.dispatch_group_s =
2012 Dec 14
2
[LLVMdev] StructType for dispatch_object_t changed by Linker
Hi, everyone. I've run into a strange problem generating code that contains the `dispatch_object_t` type. The problem happens when a program does these steps (all with the global LLVMContext): 1. Loads a module (otherModule) that uses `dispatch_object_t`. 2. Generates code that calls `dispatch_release`, which takes a `dispatch_object_t` argument, into a module (mainModule). 3. Links
2012 Jun 11
2
[LLVMdev] Why always abort in verifyFunction?
Hello everyone: I have a little question about the second argument *action* of verifyFunction. In docs: *Enumerator: * *AbortProcessAction* verifyModule will print to stderr and abort() *PrintMessageAction* verifyModule will print to stderr and return true *ReturnStatusAction* verifyModule will just return true But it still abort when I pass
2007 Nov 08
3
[LLVMdev] Newbie JITter
Hi, I'm experimenting with using LLVM to generate dynamic FFI bridges in VisualWorks Smalltalk. LLVM is an amazing thing! I'm going from dynamically generated assembler source to machine code, and I have that all working, copied from the llc tool and the JIT example. I have two questions: 1. What optimization passes, if any, should I run on the module before I pass it to the
2007 Nov 09
0
[LLVMdev] Newbie JITter
On Nov 7, 2007, at 6:10 PM, Antony Blakey wrote: > Hi, > I'm experimenting with using LLVM to generate dynamic FFI bridges > in VisualWorks Smalltalk. LLVM is an amazing thing! I'm going from > dynamically generated assembler source to machine code, and I have > that all working, copied from the llc tool and the JIT example. I > have two questions: > > 1. What
2012 Jun 11
0
[LLVMdev] Why always abort in verifyFunction?
Hi Xiu, The Verifier pass runs a PreVerifier pass, which does not honour the action argument, and will always abort on a broken module, (Line 106, lib/VMCore/Verifier.cpp) Perhaps you should file a bug against this, to allow you to not abort if you so wish. Joey On 11 June 2012 09:41, Guowei Xu <myesis at gmail.com> wrote: > Hello everyone: > > I have a little question
2012 Jun 17
3
[LLVMdev] BlockAddress instruction is copied instead of cloned during module link?
I have a module having the blockaddress instruction. When I link it into another module and delete the original, blockaddress disappears and is replaced by inttoptr (i32 1 to i8*). Please compile and run the attached program to see the demo of this problem. Right after linking modules, blockaddress still exists: @switch.bbs = internal global [3 x i8*] [i8* blockaddress(@my_func,
2013 Jan 08
2
[LLVMdev] ExecutionEngine always comes back NULL
Sorry I forgot to add code that I use to run code: /* Executes the AST by running the main function */ GenericValue CodeGenContext::runCode() { std::cout << "Running code...\n"; ExecutionEngine *ee = EngineBuilder(module).create(); vector<GenericValue> noargs; GenericValue v = ee->runFunction(mainFunction, noargs); std::cout << "Code was run.\n"; return v;
2013 Jan 08
0
[LLVMdev] ExecutionEngine always comes back NULL
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 */ > GenericValue CodeGenContext::runCode() { > std::cout << "Running code...\n"; > ExecutionEngine *ee = EngineBuilder(module).create(); > < > div
2011 Sep 06
1
several functions in one *.R file in a R package
Dear list members, i have build a package which contains a collection of my frequently used functions. To keep the code organized I have broken down some rather extensive and long functions into individual steps and bundled these steps in sub-functions that are called inside the main function. To keep an overview over which sub-function belongs to which main function I saved all the respective
2012 Jun 12
2
[LLVMdev] Why always abort in verifyFunction?
On Mon, Jun 11, 2012 at 5:44 PM, Joey Gouly <joel.gouly at gmail.com> wrote: > Hi Xiu, > > The Verifier pass runs a PreVerifier pass, which does not honour the > action argument, > and will always abort on a broken module, (Line 106, > lib/VMCore/Verifier.cpp) > So the argument can not be used as described as the official document? I just want to make sure of that and
2009 Oct 03
1
[LLVMdev] code generation goes into an infinite loop
We seem to be creating an infinite loop in llvm while trying to implement the simplest possible code generation. Specifically, we are trying to emit code for the following program, as it is easily testable from the command-line: int main(int argc) { return argc; } We got our code generator to build and link with llvm. When we run it, it pauses when running the PrintModulePass and then
2007 Dec 26
2
[LLVMdev] Instantiating modules from .bc files
Hey there, I'm relatively new to the llvm scene, and so far I'm liking it quite a bit. I'm a bit perplexed as to what llvm-gcc's role is in everything. I've used it to create .bc files for really simple functions and it seems to do quite well at that, but I've been trying to figure out how to take the output from llvm-gcc and actually use it in another program.
2009 Jun 17
0
[LLVMdev] Segmentation fault - Kaleidoscope
FWIW, I'm also suddenly experiencing segfaults in code that used to work a few days ago (I'm using svn). This may be unrelated to the problem described below, but perhaps it's the same thing. In my case it seems that creating an ExecutionEngine has changed. I used to do Module* Mod = makeLLVMModule(); // basically create a gcd function verifyModule(*Mod,
2011 Aug 31
2
[LLVMdev] How to place call(s) to functions found in other llvm modules ???
Hello Everyone, I am trying to create two modules in LLVM, where first module contains the definition of a function, gcd in this example and another module contains a call to this function. My example is based on the following tutorial, with a few changes. http://llvm.org/releases/2.6/docs/tutorial/JITTutorial2.html When I execute the verifier pass on my modules, it complains that the
2009 Jan 19
6
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
This is x86_64. I have a problem where an absolute memory load define i32 @foo() { entry: %0 = load i32* inttoptr (i64 12704196 to i32*) ; <i32> [#uses=1] ret i32 %0 } generates incorrect code on LLVM 2.4: 0x7ffff6d54010: mov 0xc1d9c4(%rip),%eax # 0x7ffff79719da 0x7ffff6d54016: retq should be 0x7ffff6d54010: mov 0xc1d9c4, %eax 0x7ffff6d54016: retq
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 */ >>
2007 Dec 26
0
[LLVMdev] Instantiating modules from .bc files
Hi Danny, On 2007-12-26, at 15:39, Danny wrote: > I've noticed that the BitcodeReader appears to be an internal > module, but the BitstreamReader is public. Should I be using the > BitstreamReader? If so how. The generic BitstreamReader class is public because it's used in other projects, including clang, to serialize data structures other than LLVM IR. The coding of
2013 Nov 26
2
[LLVMdev] Disabling optimizations when using llvm::createPrintModulePass
Hello, using the LLVM API, I've build one very simple function that adds two ConstantInts and returns the result. I noticed that, when I emit IR code, it is optimized to a simple "ret i16 42" when I add 40 and 2. I'd like to see the operations that are necessary to compute the result, though. Can I somehow disable this optimization in the pass, leading to more verbose IR code?