From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: Requesting advice from compiler writers
Date: Mon, 24 Aug 2015 11:50:21 +0000 (UTC)
Date: 2015-08-24T11:50:21+00:00 [thread overview]
Message-ID: <mrf0dt$2fb$1@dont-email.me> (raw)
In-Reply-To: 2821cd07-7462-45ec-9ae5-9ae59dc7854d@googlegroups.com
On Sun, 23 Aug 2015 11:16:00 -0700, Lucretia wrote:
> Hi,
>
> I'm one of the people considering a new Ada compiler, I would like to
> ask the people here who have actually done it, what their advice would
> be. i.e. what to aim for, what to avoid doing, etc?
>
> I personally am aiming for a library based multi-backend system.
> Basically, I'd like to see a full Ada compiler frontend with an Ada
> backend, but with the ability to poach other backends, specifically
> LLVM. My initial targets are unusual, Z80, MIPS and x86 (16-bit ->
> 64-bit) and JVM bytecode.
>
> Let the mayhem commence... :D
>
> Ta,
> Luke.
I've mentioned before : I'd suggest looking at Gela-Asis as the front
end. Natasha forked it to her Github last year, ( https://github.com/
faelys/gela-asis ) and (around the same time) I saw some activity on the
original repo (which I can't currently see at http://gela.ada-ru.org/
gela_asis ) to bring it up to date with Ada-2012.
Then I would take a good look at the ghdl project for several reasons :
https://sourceforge.net/projects/ghdl-updates/?source=navbar
it is the only example I know of, of a complex language compiler
successfully developed by a single individual. (Tristan Gingold, who now
works for Adacore. Before deciding to use anything from ghdl, it would be
worth asking him if he's comfortable that there's no conflict of interest)
it supports VHDL and therefore has quite a bit in common with Ada,
including explicit parallelism (though a different model to Ada tasking)
it is written entirely in Ada up to the intermediate representation, an
intermediate language called "ortho" (which I believe is Tristan's own).
it has one back-end also written in Ada - this is a JIT compiler, from
"ortho" currently limited to 32-bit x86, and actually performs quite well.
it also has backends from ortho to both gcc and LLVM, which between them
cover a lot of targets, but are clearly not in Ada. (and some debugging
facilities to save ortho, replay it through a backend, and to print/
examine it)
I had considered writing a layer between Gela-Asis and ortho, using the
ghdl compiler as an example of how to generate ortho. And I'm still
considering it...
-- Brian
next prev parent reply other threads:[~2015-08-24 11:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-23 18:16 Requesting advice from compiler writers Lucretia
2015-08-23 22:02 ` Pascal Obry
2015-08-24 11:50 ` Brian Drummond [this message]
2015-08-24 12:02 ` Brian Drummond
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox