similar to: [LLVMdev] how to code a loop in llvm assembly

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] how to code a loop in llvm assembly"

2006 Apr 15
2
[LLVMdev] Re: how to code a loop in llvm assembly
Simon Burton <simon at arrowtheory.com> writes: > Hi, > > I've read over the "LLVM Language Reference Manual" > a few times, and writing some ll code, but i'm stuck at > a very basic point. How to decrement a counter variable ? > > int %count(int %n) { > EntryBlock: > %cond = seteq int %n, 0 > br bool %cond, label %Exit, label %Next >
2006 Apr 13
2
[LLVMdev] standalone llvm
On Wed, 12 Apr 2006 23:02:12 -0500 (CDT) Chris Lattner <sabre at nondot.org> wrote: > > > I'd like to directly create executable code that i can > > stick in memory somewhere and jump into (call). > > Take a look at the llvm/examples directory. There are several small > programs that create LLVM IR on the fly and JIT compile it. I'm trying to take
2006 Apr 14
2
[LLVMdev] Re: standalone llvm
On Thu, 13 Apr 2006 18:07:42 +0200 Oscar Fuentes <oscarfv at telefonica.net> wrote: > > Simon Burton <simon at arrowtheory.com> writes: > > > I'm trying to take assembly and create machine code I can execute. > > How close am I ? > > Your test case is not complete. Besides, which version of llvm are you > using? What are the commands for compiling
2006 Apr 13
0
[LLVMdev] Re: standalone llvm
Simon Burton <simon at arrowtheory.com> writes: > I'm trying to take assembly and create machine code I can execute. > How close am I ? Your test case is not complete. Besides, which version of llvm are you using? What are the commands for compiling and linking your test case? How it bombs? Do you #include "llvm/ExecutionEngine/JIT.h" ? -- Oscar
2006 Apr 17
0
[LLVMdev] Re: how to code a loop in llvm assembly
On Sat, 15 Apr 2006 07:47:00 +0200 Oscar Fuentes <oscarfv at telefonica.net> wrote: > > BTW, Simon, is there a reason for writing LLVM assembler and not > generating LLVM code directly? You mean write C++ code that calls the LLVM library ? I have a mild C++ allergy that I don't wish to aggravate. > The later is simpler and relieves you > from some nasty burdens. Yes,
2006 Apr 14
2
[LLVMdev] Re: standalone llvm
On Fri, 14 Apr 2006 03:25:39 +0200 Oscar Fuentes <oscarfv at telefonica.net> wrote: ... > Simon, > > With a fresh CVS checkout, I've tried your test case on Windows/VC++ > and it works ok. Too bad that I have not access to a Linux machine > right now. I'll like to see what's wrong with your test case. > > What you get from running the test case under gdb
2006 Apr 14
0
[LLVMdev] Re: standalone llvm
Simon Burton <simon at arrowtheory.com> writes: >> There are several possibilities here: either add1 is assigned a NULL >> pointer, or LLVM was unable to use the JIT and generates bytecode >> instead of native code, or invalid native code was generated >> (unlikely). > > Well, it's not NULL: > > (gdb) print add1 > $1 = (int (*)(int)) 0x83e43b8 >
2006 Apr 18
2
[LLVMdev] Re: how to code a loop in llvm assembly
I also suffer from the same C++ allergy notably shoot in foot with dynamic grammers and overloading.. creates gasey code feeling..especially in the backend.. :)cheers! Simon Burton <simon at arrowtheory.com> wrote: On Sat, 15 Apr 2006 07:47:00 +0200 Oscar Fuentes wrote: > > BTW, Simon, is there a reason for writing LLVM assembler and not > generating LLVM code directly? You
2006 Apr 14
0
[LLVMdev] Re: standalone llvm
Simon Burton <simon at arrowtheory.com> writes: > I'm using llvm CVS, and manage to compile/link OK. Yes I include JIT.h. > The program segfaults when it gets to calling the function pointer. > >>From the Makefile: > > llvmjit: llvmjit.o > g++ llvmjit.o /home//users//simonb//lib/LLVMAsmParser.o /home//users//simonb//lib/LLVMInterpreter.o `llvm-config --ldflags`
2006 Apr 13
4
[LLVMdev] standalone llvm
Is it possible to get llvm to generate native machine code without using gcc and friends ? Do I use lli ? I'd like to directly create executable code that i can stick in memory somewhere and jump into (call). (I'm looking to use llvm in a BSD licensed project). Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com
2006 Apr 13
0
[LLVMdev] standalone llvm
On Thu, 13 Apr 2006, Simon Burton wrote: > > Is it possible to get llvm to generate native machine code > without using gcc and friends ? Do I use lli ? LLVM only needs llvm-gcc to translate from C/C++ to LLVM IR. If you already have code in LLVM IR form (e.g. because you're generating it on the fly or you have your own front-end) you don't need llvm-gcc. > I'd like to
2006 May 05
2
[LLVMdev] ExecutionEngine blew the stack ?
On Fri, 5 May 2006, Simon Burton wrote: > This leads me to my next question: as I make more and more functions > with the EE, it slows down. I am re-using the Module, ExistingModuleProvider, > and ExecutionEngine, and pumping the parser like so: > M = ParseAssemblyString(AsmString, M); > ISTM that there should be a way of creating multiple modules/EEs but I ran > into trouble
2006 Jun 21
3
[LLVMdev] size of generated machine code ?
On Tue, 20 Jun 2006, Chris Lattner wrote: > On Wed, 21 Jun 2006, Simon Burton wrote: >> This from the output: >> >> 24620 x86-emitter - Number of machine instructions emitted >> >> (i had to write a dummy main function to get this to work) >> >> Is this really the number of bytes of machine code ? > Yes. To be specific, this is the
2006 Apr 19
2
[LLVMdev] floating point exception and SSE2 instructions
On Tue, 18 Apr 2006 23:27:39 -0700 Evan Cheng <evan.cheng at apple.com> wrote: > Hi Simon, > > The x86 backend does generate scalar SSE2 instructions. For your > example, it should emit something like: Oh, how did you get this ? [...] > > There is nothing here that should cause an exception. Are you using a > release or cvs? CVS. >From what I remember,
2006 May 05
0
[LLVMdev] ExecutionEngine blew the stack ?
On Fri, 5 May 2006 01:19:08 -0500 (CDT) Chris Lattner <sabre at nondot.org> wrote: > > On Fri, 5 May 2006, Simon Burton wrote: > > This leads me to my next question: as I make more and more functions > > with the EE, it slows down. I am re-using the Module, ExistingModuleProvider, > > and ExecutionEngine, and pumping the parser like so: > > M =
2006 Apr 19
2
[LLVMdev] floating point exception and SSE2 instructions
Hi, I'm building a little JIT that creates functions to do array manipulations, eg. sum all the elements of a double* array. I'm writing this in python, generating llvm assembly intructions and piping that through a call to ParseAssemblyString, ExecutionEngine, etc. It's working OK on integer values, but i'm getting nasty floating point exceptions when i try this on double*
2006 Jun 21
0
[LLVMdev] size of generated machine code ?
On Tue, 20 Jun 2006 22:38:24 -0500 (CDT) Chris Lattner <sabre at nondot.org> wrote: > > >> Is this really the number of bytes of machine code ? > > Yes. > > To be specific, this is the number of bytes of machine code JIT'd. Thus, > this only includes the stuff reachable from main, for example. To see > specifically what functions it is compiling and
2006 May 05
1
[LLVMdev] ExecutionEngine blew the stack ?
On Fri, 5 May 2006 16:43:13 +1000 Simon Burton <simon at arrowtheory.com> wrote: > > It slows in the construction phase, so one of these calls: > M = ParseAssemblyString(AsmString, M); > verifyModule( *M ) > M->getNamedFunction(name); > EE->getPointerToFunction > > It feels like there is a linear name lookup going on somewhere. it's
2006 May 31
2
[LLVMdev] size of generated machine code ?
Hi, Is there a way to find out how much memory some JIT'ed machine code uses ? Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com
2006 Jun 12
2
[LLVMdev] JIT'ing constant globals
It seems one can only put constant global statements _before_ any functions are defined, not after. I would like to produce eg. "hello world!" functions in a JIT. So I was hoping to use global string constants. Is there another way to do this kind of thing ? thanks, Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940