comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: LLVM and GCC (was: Forking old GMGPL libs ?)
Date: Sat, 6 Oct 2012 15:11:15 +0000 (UTC)
Date: 2012-10-06T15:11:15+00:00	[thread overview]
Message-ID: <k4phmj$gmn$1@dont-email.me> (raw)
In-Reply-To: 87fw5rhmbv.fsf_-_@ludovic-brenta.org

On Sat, 06 Oct 2012 13:27:48 +0200, Ludovic Brenta wrote:

> Brian Drummond writes on comp.lang.ada:
>> I am currently trying to get GHDL to build with gcc 4.7; it last built
>> successfully with gcc4.3.4 or so. 

> I'm glad you're doing this; the package ghdl in Debian unstable is stale
> and is the last one that still requires gnat-4.4; all other Ada packages
> have migrated to gnat-4.6 long ago.

Thanks. I'm working with 4.7 (home built) on Debian, but it should back 
port to 4.6 easily. If you would permit, I may have to bug you with 
questions on the gcc build system, I am very weak in that area.

So far it builds, and compiles the VHDL standard library (with some 
fiddling) but the make process then falls over building libgcc, so I 
can't get as far as "make install".

I have also fiddled with the makefiles; I need to learn how to back-
propagate these fiddles into the inputs to ./configure. (Running a 
configure each time you change something gets old fast!)

Later it might be worth turning GHDL into a gcc plugin, though that may 
be more than I want to try...

>> LLVM
>> looked to me like a virtual machine (asm-like) rather than a syntax
>> tree (AST like Generic or Gimple in gcc terms). Which to me, would
>> raise the question of whether the LLVM back end can do the
>> optimisations you want.
> 
> LLVM is both the virtual machine and an intermediate representation[1].
> Contrary to GCC, LLVM's IR is serializable: one can save it to disk and
> re-load it into the virtual machine for ahead-of-time or just-in-time
> compilation.  

It's very neat stuff and thanks for the reference. But on a brief 
reading, it does not quite answer my question ... can the intermediate 
representation (IR) represent a tree?

> ... DragonEgg, whereby the
> GCC Ada front-end feeds its AST into LLVM, which then translates it to
> its IR, runs its optimizers and emits the final assembly.

which suggests the AST is in ANOTHER format, albeit one which LLVM can 
read and transform into IR. I saw no mention of that other format ( or 
dialect of IR)? or a tree reader in the reference manual. (It is entirely 
possible I missed it!)

The way I read, DragonEgg uses the GCC tools to work on the tree, and 
feeds something lower level (e.g. SSA) which is already close to the LLVM 
IR.

- Brian



      parent reply	other threads:[~2012-10-07 17:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 22:51 Forking old GMGPL libs ? Patrick
2012-10-05 23:52 ` Georg Bauhaus
2012-10-06  3:28   ` Patrick
2012-10-06  9:11     ` Georg Bauhaus
2012-10-06  4:52 ` Stephen Leake
2012-10-06  7:10 ` Florian Weimer
2012-10-06  8:10 ` Simon Wright
2012-10-06  9:45 ` Brian Drummond
2012-10-06 11:27   ` LLVM and GCC (was: Forking old GMGPL libs ?) Ludovic Brenta
2012-10-06 14:04     ` Patrick
2012-10-06 15:11     ` Brian Drummond [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox