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=-0.6 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,577ecbb6c5a53a1f X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.79.6 with SMTP id f6mr3549919pax.3.1349630802568; Sun, 07 Oct 2012 10:26:42 -0700 (PDT) Path: g9ni31636pbh.1!nntp.google.com!border1.nntp.dca.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!xlned.com!feeder3.xlned.com!feeder.erje.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: LLVM and GCC (was: Forking old GMGPL libs ?) Date: Sat, 6 Oct 2012 15:11:15 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <5de9a47c-6594-4653-a083-38f90312e70e@googlegroups.com> <87fw5rhmbv.fsf_-_@ludovic-brenta.org> Mime-Version: 1.0 Injection-Date: Sat, 6 Oct 2012 15:11:15 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="0e44dd4a3c4e0a6e83a86f947fb780ae"; logging-data="17111"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18TJU0MYNxltbzSghgjWb+B4cfxsrF9odw=" User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) Cancel-Lock: sha1:NNLURbu2+Qy349clvnNh2RQTKgo= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2012-10-06T15:11:15+00:00 List-Id: 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