[LLVMdev] Extending LLVM
Rahul Joshi
rujoshi at uiuc.edu
Fri Mar 26 16:57:01 PST 2004
I would also find this extension framework useful.
Particularly, I would like to add intrinsics (without
checking them into the LLVM source), and an "opaque"
instruction which does not write to memory (and hence can
be DCEliminated). Just a thought...
Rahul
---- Original message ----
>Date: Fri, 26 Mar 2004 14:41:17 -0800
>From: Reid Spencer <reid at x10sys.com>
>Subject: Re: [LLVMdev] Extending LLVM
>To: LLVMdev List <llvmdev at cs.uiuc.edu>
>
> I was going to wait to bring this up but since the
> topic has been addressed ...
>
> Would people other than myself find it useful to
> have a standardized extension framework for LLVM?
> I'm thinking of something that would allow new LLVM
> instructions, fundamental types, structured types,
> etc. This would require significant work to allow
> the various pieces of LLVM (assembler, disassembler,
> runtime, JIT, optimization, analysis, code gen,
> etc.) to be extended arbitrarily. Each extension
> would be a self-contained piece of code that could
> be dynamically loaded by LLVM core and used at the
> right times during LLVM execution. Such things as
> threading support, advanced math functions,
> scientific computations and types
> (rational,complex,etc.), higher order data
> structures, etc. could all be done as extensions
> instead of adding them to the core. This would keep
> the core small(ish) and allow researchers and
> implementors to add things to LLVM in an isolated
> fashion.
>
> What think ye?
>
> Reid.
>
> On Fri, 2004-03-26 at 11:29, Chris Lattner wrote:
>
> On Fri, 26 Mar 2004, Bill Wendling wrote:
>
> > It is possible to extend LLVM to add, say, matrix operations at a higher
> > level and then "lower" them into some version of LLVM "proper" after
> > performing any transformations on them, right? Also, it's possible to
> > have any custom-made types (like "matrix") as well?
>
> It is certainly possible to do things like this. I would recommend adding
> a small set of intrinsic functions for the various operations that you
> would like to support (matrix matrix multiply, etc), which your high-level
> passes would easily recognize and be able to transform. You would then
> have a lowering pass that did the obvious expansion on them.
>
> I don't think that you'd need to have an LLVM "matrix" type. You should
> be able to just use a two dimensional array, or opaque type, or
> whatever.
>
> -Chris
>________________
>signature.asc (1k bytes)
More information about the llvm-dev
mailing list