From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:7597:: with SMTP id y145-v6mr826652itc.30.1527002703659; Tue, 22 May 2018 08:25:03 -0700 (PDT) X-Received: by 2002:a9d:1921:: with SMTP id j33-v6mr169191ota.9.1527002703422; Tue, 22 May 2018 08:25:03 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!v8-v6no5846284itc.0!news-out.google.com!f20-v6ni6507itd.0!nntp.google.com!v8-v6no5846280itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 22 May 2018 08:25:03 -0700 (PDT) In-Reply-To: <1708709981.548685549.556712.laguest-archeia.com@nntp.aioe.org> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=47.185.233.194; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 47.185.233.194 References: <5c2523c1-9ea5-453c-b80e-9cb0dcd16de0@googlegroups.com> <1708709981.548685549.556712.laguest-archeia.com@nntp.aioe.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <810fe4b8-2643-4c8f-9db9-db678602636e@googlegroups.com> Subject: Re: DragonEgg has been revived From: "Dan'l Miller" Injection-Date: Tue, 22 May 2018 15:25:03 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:52574 Date: 2018-05-22T08:25:03-07:00 List-Id: On Tuesday, May 22, 2018 at 7:41:52 AM UTC-5, Luke A. Guest wrote: > Simon Clubley wrote: > > I'm not really bothered how that happens but LLVM seems like an > > interesting option. > >=20 > > The real question however is will this Ada compiler still work with > > the versions of the toolchains available 2-5 years from now or will > > it fall into disuse just like DragonEgg did ? >=20 > It would depend on how well it=E2=80=99s maintained and how many people s= tep up to > help out. How well maintained it is depends almost entirely on how clean the design i= s to be easily maintainable in the first place. DragonEgg failed miserably= at that goal (if DragonEgg even had that as a goal at all). As I have sai= d on other c.l.a threads in the past few days, DragonEgg's =E2=80=98guiding= principle=E2=80=99 that the original author effectively seemed to have on = his mind was evidently =E2=80=98metastasizing cancer=E2=80=99 as opposed to= =E2=80=98quarantining=E2=80=99. Instead of what DragonEgg pursued, this is what GELI (pronounced =E2=80=98j= elly=E2=80=99), the wise person's rebuttal to DragonEgg should pursue to us= her in a new era for Ada: A) GELI must be focused on GNAT-only. =E2=96=B6=EF=B8=8E Abandon DragonEgg's goal of LLVM back-end for non-Ada la= nguages in GCC. =E2=96=B6=EF=B8=8E All the GCC languages other than Ada already have an LLV= M-backended compiler. Let them go forth & prosper on their own. B) GELI must have an extraordinarily-clean dotted line for the Liskov-subst= itution-principle (LSP) laser to cut an ultra-precise low-drama boundary be= tween FSF GCC and the GELI project. =E2=96=B6=EF=B8=8E Abandon DragonEgg's touch-too-much. =E2=96=B6=EF=B8=8E GELI would pursue no-drama coexistence, a single low-dra= ma rarely-modified interface-with-GNAT, and quarantining as a victorious st= rategy for easy maintenance long-term, perhaps indefinitely, as GELI is unl= ikely to be embraced lovingly by either the GCC or the LLVM communities. B.a) The Ada iterator/cursor in GNAT that walks GNAT's full-semantically-ad= orned Ada IR tree to feed snippets to GIGI appears to be the least-churn lo= west-drama interface in the vicinity of any member of the set {GIGI, GENER= IC, C IR tree, high GIMPLE, low GIMPLE, RTL, the rest of GNAT's GCC back-en= d}. =E2=96=B6=EF=B8=8E The history of GNAT almost screams =E2=80=9CCut here alo= ng the dotted line=E2=80=9D regarding that iterator/cursor. B.b) Hence, the name GELI as initialism for: GIGI-alternative Emits LLVM I= R. =E2=96=B6=EF=B8=8E i.e., emits LLVM IR in DRAM to a copy of the entirety of= LLVM's source code imported wholesale into GCC repository as a single GNAT= executable to comply with the Target Code clause of GPLv3 and the Eligible= Compilation Process clause of the Runtime Exception. =E2=96=B6=EF=B8=8E Emitting any IR=E2=80=93either GCC or LLVM=E2=80=93to a = file [or mmap()ed memory] from GCC would fail to comply with the Target Cod= e and Eligible Compilation Process causes, which in turn would make any dow= nstream machine code generated be staunchly GPLv3, i.e., no Runtime Excepti= on, no GMGPL. =E2=96=B6=EF=B8=8E Moral of the story: absolutely never emit any IR to a f= ile (or mmap()ed shared memory. C) Unlike DragonEgg, GELI and LLVM would absolutely not be strewn throughou= t GCC source code. =E2=96=B6=EF=B8=8E No touching of GCC or LLVM source code* means no mainten= ance whatsoever of LLVM or the vast bulk of GNAT/GCC, other than copying th= em in verbatim. =E2=96=B6=EF=B8=8E Import all of GCC and all of LLVM verbatim except for me= rge conflicts at the extraordinarily few places where GELI touches/modifies= GCC. =E2=96=B6=EF=B8=8E GELI would merely invoke LLVM, presenting LLVM with gard= en-variety LLVM IR, so GELI shall not touch/modify LLVM whatsoever, other t= han verbatim copying of the entirety of LLVM's source code into the GCC rep= ository and building it. * other than the set {the Ada iterator/cursor, its factory (method), the = =E2=80=9Cllvm-=E2=80=9D prefixed targets on the GNAT command line, scripts = invoking additional tests} D) All the ISA targets that LLVM supports now and in the future would be pr= efixed with =E2=80=9Cllvm-=E2=80=9D on GNAT's command line. =E2=96=B6=EF=B8=8E This assures that no one is ever confused due to similar= ly-named targets in GCC-world versus LLVM-world. =E2=96=B6=EF=B8=8E GNAT users will know precisely which back-end is generat= ing the machine code: GELI feeding LLVM versus GIGI feeding GCC-back-end. E) Additional test-cases, test-drivers, or test-suites might need to be add= ed to stress test and regression test topics that are currently not tested = or not tested well in ACATS or any of GCC's existing tests. F) To be easily maintainable, GELI would have strictly-enforced prohibition= s on modifying =E2=80=A2anything=E2=80=A2 in GCC other than: F.a) the GELI-replacement iterator/cursor in Ada for the Ada current iterat= or/cursor in GNAT that walks the fully-semantically-adorned Ada IR tree, an= d a factory or factory method thereof to instantiate the correct GELI-feedi= ng one versus the GIGI-feeding one, depending on whether an LLVM or GCC ISA= target was selected on the GNAT command line. F.b) GELI's source code and the entirety of LLVM's source code and any addi= tional test suites would merely be present co-existing in the GCC repositor= y. =E2=96=B6=EF=B8=8E Only the Ada iterator/cursor, its factory (method), the = =E2=80=9Cllvm-=E2=80=9D-prefixed LLVM targets on GNAT's command line, and s= cripts that merely invoke additional test suites would be the places at whi= ch the GELI project would not be mere coexistence of additional files & dir= ectories in FSF GCC repository. G) If GELI's development stresses GCC or LLVM in ways that reveal a bug in = GCC or in LLVM, then try to find a way of replicating the bug outside of GE= LI in FSF GNAT, FSF GCC at large, Clang, Flang, LLVM, or any other non-GELI= project on planet Earth. =E2=96=B6=EF=B8=8E Try very diligently to never predicate a bug fix (or wor= se, new-feature request) at GCC or LLVM on GELI. =E2=96=B6=EF=B8=8E This means GELI should go the extra mile (or ten miles) = to use GCC or LLVM verbatim as is, enacting workarounds in already-extant G= CC or in already-extant LLVM whenever practical. Hence, GELI would be easily maintainable, focusing only on what DragonEgg d= oes not focus on at all: =E2=80=A2 the river of new Ada features & bug-fixes semantically adorned on= the Ada IR by FSF GNAT; =E2=80=A2 the addition & removal of LLVM ISA targets begetting changes to t= he =E2=80=9Cllvm-=E2=80=9D-prefixed targets on GNAT's command-line; =E2=80=A2=C2=A0the rare changes in FSF GNAT to the interface to the Ada ite= rator/cursor that feeds GIGI; =E2=80=A2=C2=A0wholesale importing the entirety of new releases of LLVM at,= say, major.minor releases of GCC. > > There's a confidence problem here. I can write C and C++ code in 2018 > > for some random embedded target knowing there's a very very good chance > > I will still be able to compile that code on the freely available > > toolchains which will exist 5 years from now. It would seem that GELI would increase your confidence via: 1) providing an alternate 2nd-source for machine-code generation of targets= for some embedded processor (when GCC lacks a target, LLVM might support i= t); 2) providing an easily maintainable quarantining of the churn with as littl= e drama as possible in widely-available open-source repository; 3) complying fully with the Target Code and Eligible Compilation Process ca= uses of the GPLv3 and its Runtime Exception to assure that machine code gen= erated by this GELI-feeds-LLVM back-end would be distributable as you pleas= e for execution 3.1) Importation of GCC-emitted-as-Target-Code machine code into McSema for= reworking would still be encumbered by GPLv3, as that machine code would b= e deemed IR by the Target Code & Eligible Compilation Process clauses. > > As I have said before, the language is _really_ good, but the compiler > > situation is lousy. >=20 > We need a new one not controlled by a company/monopoly.