comp.lang.ada
 help / color / mirror / Atom feed
From: "Dan'l Miller" <optikos@verizon.net>
Subject: Re: DragonEgg has been revived
Date: Fri, 25 May 2018 11:09:00 -0700 (PDT)
Date: 2018-05-25T11:09:00-07:00	[thread overview]
Message-ID: <0d746f25-aa16-4d5c-9a9a-82c0e4c7b143@googlegroups.com> (raw)
In-Reply-To: <ly36yffysq.fsf@pushface.org>

On Friday, May 25, 2018 at 12:08:39 PM UTC-5, Simon Wright wrote:
> I believe that there's considerable cross-communication between the
> higher (Ada) and lower (GCC internal) stages of the compiler. No proof,
> too deep for me!

I might be factually incorrect, but here is what I think that currently know:

AIUI from my kill-off-DragonEgg investigations pursuant to GELI aforementioned on this thread,
0) GNAT's AST gets constructed during lexing & parsing.

1) The GNAT front-end grinds on _LRM_ semantics very hard via many passes of adorning the nodes of the AST to incrementally become more the full-fledged Ada-IR tree.

1.1) Fascinatingly, slide 4 of the PowerPoint below indicates that GNAT's many passes are organized literally in the chapter-order of the _LRM_.

2) Then the Ada-IR tree has reached its terminus state of being fully semantically adorned.

3) Then and only then walked by an Ada iterator/cursor that feeds snippets to C-language-implemented GIGI.

4) GIGI then authors high GIMPLE as the C-IR tree.  Once that tree-transduction completes,

5) then high GIMPLE begets authoring low GIMPLE,*

6) then low GIMPLE begets RTL,*

7) then RTL begets authoring target hardware-processor machine-code.*

* the same in steps 5, 6, & 7 as it does for C/C++ unbeknownst to which language was in the front end;  Ada adds fewer than 10 treenode-types to high GIMPLE that were lacking in C/C++-world.  I say fewer than because it appears 6 of those 10 somehow never really make it out of GIGI, as if they are temporary, leaving 4 treenode-types leaving GIGI that are peculiar to Ada semantics, not exercised by C/C++ semantics.

> > The documentation needs to be external to the source, so you don't
> > have to go around the sources looking for stuff. This documentation
> > can be generated from the source though.
> 
> GNAT doesn't have any publicly-visible design documentation that I'm
> aware of,

Well, not much more than this 11-slide PowerPoint presentation:
https://www.slideserve.com/reed/the-structure-of-the-gnat-compiler

which is enough to see the GIGI-to-highGIMPLE portion of the architecture on slides 2 & 7.  The fully-semantically-adorned AST/Ada-IR tree that is fed as input into the GIGI tree-transducer via an Ada-language iterator/cursor that walks that Ada-IR tree is described on slides 9, 10, & 11.

Historically, GENERIC, high GIMPLE, low GIMPLE, and RTL are documented at the URL below, whose WWWpage claims to be current for the forthcoming GCC 9.0 era, but portions might be lagging behind one or more major releases of GCC:
https://gcc.gnu.org/onlinedocs/gccint/index.html#Top
in the GENERIC & GIMPLE URLs.

Some people say that GCC's C/C++ compiler authors high GIMPLE directly skipping the older-era GENERIC, whereas this documentation says that high GIMPLE is a subset of GENERIC, so whatever that state of affairs really really means.  (e.g., why does high GIMPLE have a different name than GENERIC then?  I don't know.  I haven't reached full grok yet.)

  reply	other threads:[~2018-05-25 18:09 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21 21:37 DragonEgg has been revived Simon Clubley
2018-05-21 22:20 ` Dan'l Miller
2018-05-21 22:26 ` Luke A. Guest
2018-05-22 12:12   ` Simon Clubley
2018-05-22  1:02 ` Dan'l Miller
2018-05-22 12:29   ` Simon Clubley
2018-05-22 12:41     ` Luke A. Guest
2018-05-22 15:25       ` Dan'l Miller
2018-05-22 19:40     ` Shark8
2018-05-22 20:17       ` Dan'l Miller
2018-05-22 21:04         ` Dan'l Miller
2018-05-22 22:33         ` Shark8
2018-05-23  1:58           ` Dan'l Miller
2018-05-23  7:26     ` Simon Wright
2018-05-23  8:11       ` Luke A. Guest
2018-05-23 14:10       ` Dan'l Miller
2018-05-23 15:46       ` Dan'l Miller
2018-05-23 15:51       ` Dan'l Miller
2018-05-23 19:27         ` Chris M Moore
2018-05-23 20:30           ` Dan'l Miller
2018-05-23 22:18             ` Chris M Moore
2018-05-24  0:12               ` Dan'l Miller
2018-05-24  8:00                 ` Simon Wright
2018-05-24  7:19         ` Simon Wright
2018-05-24 15:38           ` Dan'l Miller
2018-05-24 16:44             ` Dan'l Miller
2018-05-24 18:07               ` Lucretia
2018-05-25  0:09                 ` Dan'l Miller
2018-05-24 17:19             ` Simon Wright
2018-05-24 19:26               ` Dan'l Miller
2018-05-24 21:59                 ` Chris M Moore
2018-05-24 22:15                   ` Dan'l Miller
2018-05-24 22:22                     ` Dan'l Miller
2018-05-25  0:19                   ` Luke A. Guest
2018-05-25 13:16                     ` Simon Clubley
2018-05-25 13:29                       ` Lucretia
2018-05-25 17:08                         ` Simon Wright
2018-05-25 18:09                           ` Dan'l Miller [this message]
2018-05-25 16:25                     ` Jeffrey R. Carter
2018-05-25 17:01                       ` Dan'l Miller
2018-05-25  1:54                   ` Dan'l Miller
2018-05-25  2:56                     ` Luke A. Guest
2018-05-25  3:38                       ` Dan'l Miller
2018-05-25 11:12                         ` Brian Drummond
2018-05-24 20:50               ` Dan'l Miller
2018-05-24 20:56               ` Dan'l Miller
2018-05-24 21:00                 ` Dan'l Miller
2018-05-24 20:23             ` G. B.
2018-05-25  7:16             ` Chris M Moore
2018-05-25  8:09               ` Simon Wright
2018-05-25  8:28             ` Simon Wright
2018-05-25 20:02               ` Dan'l Miller
replies disabled

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