search for: arrowtheori

Displaying 20 results from an estimated 48 matches for "arrowtheori".

Did you mean: arrowtheory
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 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 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 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 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 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 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 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 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 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 15
6
[LLVMdev] how to code a loop in llvm assembly
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 Next: ; how to decrement n ? %new_n = sub int %n, 1 br label %EntryBlock Exit: ret int 0 } I guess I
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 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 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 May 05
2
[LLVMdev] ExecutionEngine blew the stack ?
Segfault in EE->getPointerToFunction. I think it's blown the stack, gdb reports a never ending backtrace (below). I generate llvm assembly and parse/verify OK. Attached is the assembly. It is the smallest example generated that causes the segfault. If this EE uses a recursive function (??), it seems an inherent limitation in how big llvm functions can be. Simon. gdb backtrace: #0
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 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 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 19
0
[LLVMdev] floating point exception and SSE2 instructions
On Wed, 19 Apr 2006 19:28:34 +0100 Simon Burton <simon at arrowtheory.com> wrote: > > >From what I remember, this is a bug in debian libc: > some floating point flags are set incorrectly causing SIGFPE. > Can't find the bug report ATM. Oh, it just showed up on numpy-discussion: http://sources.redhat.com/bugzilla/show_bug.cgi?id=10 """ #include