octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave and LLVM google summer of code project


From: dbateman
Subject: Re: octave and LLVM google summer of code project
Date: Sat, 19 Apr 2008 12:49:51 -0700 (PDT)



Eugene I wrote:
> 
> Freemat has LLVM based JIT compiler slanted for the next release. You can
> check freemat source tree to see how it is implemented. 
> 
> The basic approach is to try to compile the AST, if it fails (feature not
> implemented or type change) then fall back to interpreting the code. For
> vector and matrix operations, we simply call BLAS code (through same
> interface that the interpreter uses) under the assumptions that compiled
> code won't provide any speed up. The main advantage of JIT compiled code
> is for array index operations - you can get fantastic results. 
> 
> There are a few tricks you one can use with LLVM to avoid writing
> pseudo-assembly code by hand. Also, one major gotcha we discovered is that
> you can't apply LLVM global optimization steps to dynamically generated
> code - the results are amusingly unpredictable. 
> 
> With a bit of hard work, I think prototype implementation can be done in
> 10 weeks. Good luck.
> 

I presume that 

http://freemat.svn.sourceforge.net/viewvc/freemat/branches/array-rework/FreeMat2/libs/libMatC/

is where I should be looking for the latest versions of this code. Looking
at the (JIT.{cpp,hpp})JIT class in FreeMat it seems fairly well abstracted
from the rest of FreeMat and so any Octave implementation could just take
it. It just supplies an abstraction layer it LLVM itself. The
(JITFunc.{cpp,hpp})JITFunc class accesses the Freemat symbol table and some
other parts of the parse tree etc and so would need quite some work, though
this class itself is a good start. As far as I can see from the Makefile the
other files aren't used.

I've always felt that Octave should profit more than it has from the FreeMat
code and visa-versa. This looks like a good chance to put that into
practice. Ideally we should get you to fix all the bug first ;-)

D.

-- 
View this message in context: 
http://www.nabble.com/octave-and-LLVM-google-summer-of-code-project-tp16565922p16787024.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]