<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.9">
</HEAD>
<BODY>
<FONT COLOR="#301fe4"><I>I was going to wait to bring this up but since the topic has been addressed ...</I></FONT><BR>
<BR>
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.<BR>
<BR>
What think ye?<BR>
<BR>
Reid.<BR>
<BR>
On Fri, 2004-03-26 at 11:29, Chris Lattner wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#301fe4"><I>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</I></FONT></PRE>
</BLOCKQUOTE>
</BODY>
</HTML>