comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian3@shapes.demon.co.uk>
Subject: Re: Augusta: An open source Ada 2012 compiler (someday?)
Date: Thu, 20 Mar 2014 00:00:16 GMT
Date: 2014-03-20T00:00:16+00:00	[thread overview]
Message-ID: <kcqWu.87084$fr7.73764@fx20.fr7> (raw)
In-Reply-To: 2_2dnSTeev2DurfO4p2dnAA@giganews.com

On Wed, 19 Mar 2014 19:24:13 -0400, Peter Chapin wrote:

> On 2014-03-19 19:04, Brian Drummond wrote:
> 
>> LLVM appears to have problems supporting nested (locally declared)
>> subprograms. This appears to be behind slow progress on the Dragonlace
>> project, to use Gnat as an LLVM front end.
> 
> Thanks for the heads up... I'll have to keep that in mind. One advantage
> of having a project that is 99% talk and only 1% action is that I'm not
> deeply committed to a particular back-end technology yet. I do know that
> I don't want to deal with all the low level code generation stuff,
> however.

GHDL has a level called "ortho", pretty much an intermediate language 
representing the syntax tree, with three backend translators : 

to gcc (gimple) code, whence gcc provides all the optimisation passes, 
and the low level code generation to (potentially) any of its backend 
targets; 

to llvm (experimentally in the current trunk) - I haven't tried this yet.

to "mcode" - ghdl's own JIT compiler (x386 only so far). Astonishingly 
(to me anyway) I benchmarked this JIT version - which is tiny as 
compilers go, under 0.8MB source - the executable was only 20% slower 
than gcc -O2. Now I might just have been lucky (or unlucky!) on the 
testcase I picked, but I was expecting a naive translator to be quite a 
bit slower than gcc...

The interfaces from "ortho" to gcc and llvm are 100kbytes and 250kbytes 
of source; mostly Ada, naturally. (the gcc interface includes ONE C file. 
Guess where most of the problems are... :-) I see the LLVM interface also 
has one C++ file; and it is much smaller...

https://sourceforge.net/projects/ghdl-updates/

May be worth some investigation as an approach to retain portability 
between back-ends. 

(There is also a mode where "ortho" can be saved, inspected, and later 
passed to the gcc backend, to simplify working on the compiler).

My own dreams of an independent Ada compiler involve using this 
intermediate level as a proven piece of the puzzle.

>> (I strongly believe Ada and VHDL users should
>> talk to each other more than they do!) and he also ran into this.
> 
> I tend to agree about the VHDL/Ada connection.

Even just because of VHDL's relative popularity in the FPGA world; there 
are 2 StackExchange questions tagged "vhdl" for every question tagged 
"ada". And yet not many VHDL users realise there's an equally good or 
better language for the software aspects of their design.

-- Brian


  reply	other threads:[~2014-03-20  0:00 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 13:24 Augusta: An open source Ada 2012 compiler (someday?) Peter Chapin
2014-03-19 18:56 ` Tero Koskinen
2014-03-19 23:02   ` Peter Chapin
2014-03-20 18:13   ` Shark8
2014-03-20 22:41     ` Augusta: An open source Ada 2012 compiler (someday?) (Off topic) erlo
2014-03-20 23:21       ` Randy Brukardt
2014-03-19 23:04 ` Augusta: An open source Ada 2012 compiler (someday?) Brian Drummond
2014-03-19 23:24   ` Peter Chapin
2014-03-20  0:00     ` Brian Drummond [this message]
2014-03-20 18:35   ` Shark8
2014-03-22 14:30     ` Brian Drummond
2014-03-20 10:23 ` Lucretia
2014-03-20 10:49   ` J-P. Rosen
2014-03-20 23:15     ` Randy Brukardt
2014-03-24  8:18       ` J Kimball
2014-03-24  9:17         ` Thomas Løcke
2014-03-24 10:00           ` Brian Drummond
2014-03-24 14:16           ` Luke A. Guest
2014-03-24 12:51         ` Peter Chapin
2014-03-24 21:21         ` Randy Brukardt
2014-03-24 23:18           ` Dennis Lee Bieber
2014-03-24 23:50             ` J Kimball
2014-03-25  9:37           ` Stefan.Lucks
2014-03-25 20:47             ` Randy Brukardt
2014-03-25 19:41         ` Michael B.
2014-03-26  1:50           ` Shark8
2014-03-26 20:39             ` Simon Clubley
2014-03-27  9:32               ` Shark8
2014-03-27 20:02                 ` Simon Clubley
2014-03-27 20:38                   ` Lucretia
2014-03-27 21:51                     ` Niklas Holsti
2014-03-27 22:32                       ` Luke A. Guest
2014-03-28  5:12                         ` Shark8
2014-03-28  5:11                           ` J Kimball
2014-03-28  8:06                         ` Georg Bauhaus
2014-03-28 11:31                       ` Peter C. Chapin
2014-03-31 23:43                         ` Randy Brukardt
2014-03-28  8:56                     ` Dmitry A. Kazakov
2014-03-28 19:20                   ` Dan'l Miller
2014-03-28 20:40                     ` Dmitry A. Kazakov
2014-03-29 12:34                       ` Dan'l Miller
2014-03-29 13:36                         ` Dmitry A. Kazakov
2014-03-29 12:42                       ` Dan'l Miller
2014-03-29  0:15                     ` Peter Chapin
2014-03-29  3:39                       ` Shark8
2014-03-29  8:46                       ` Georg Bauhaus
2014-03-29 16:35                         ` Peter Chapin
2014-03-29  9:51                       ` Georg Bauhaus
2014-03-20 19:03   ` Shark8
2014-03-20 18:10 ` Shark8
2014-03-20 18:20   ` Qun-Ying
replies disabled

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