[jhc] jhc backend

John Meacham john at repetae.net
Wed Feb 20 18:16:06 EST 2008


On Wed, Feb 20, 2008 at 11:14:41PM +0100, Csaba Hruska wrote:
> Hi!
> Will jhc strictly generate only c code ?
> I know the llvm compiler framework (llvm.org), and what do you think of
> using llvm for (imperative) backend instead of current c backend.
> LLVM can generate c code too and it supports many platforms (X86, IA64,
> SPARC, ARM, MIPS, SPU, POWERPC) and also handles all platform specific
> stuff.

Yeah, I looked at LLVM, it should actually be quite straightforward to
create a back end for it. LLVM might be a particularly well suited back
end for jhc since Monadic Grin code has a direct correspondence to SSA
form. I have been getting rid of all C specific stuff from the
compilation path, for instance, now basic operators are specified as an
abstract type in C.Op rather than as mappings to C operators.

> LLVM uses an intermediate language (typed risk lile language), and uses SSA
> form. Many optimizations can be done via llvm.
> and llvm supports JIT (Just In Time ) compilationm, taht can be useful for
> interactive (interpreters) use of haskell.
> 
> any opinion ?

Sounds like it could be fun. I am all for jhc having many different back
ends. I have most of the framework for a .NET CLR back end implemented as
well.

        John

> P.S.:
> I'm new here so let me to introduce: My name is Csaba Hruska, i'm in the 5th
> year in university  (BME budapest, hungary). i'm studiyng computer science.

Welcome! :)


-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the jhc mailing list