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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,99ab4bb580fc34cd X-Google-Attributes: gid103376,public From: kenner@lab.ultra.nyu.edu (Richard Kenner) Subject: Re: Q: access to subprogram Date: 1996/07/08 Message-ID: <4rqqa9$r32@news.nyu.edu>#1/1 X-Deja-AN: 167629567 references: organization: New York University Ultracomputer Research Lab newsgroups: comp.lang.ada Date: 1996-07-08T00:00:00+00:00 List-Id: In article Mark Eichin writes: >If I remember correctly, the other big reason is that reading >externally generated rtl or tree structures would make non-Free >frontends possible, and that would be a Bad Thing. This way anything >that takes advantage of the backend needs to also be Free. The other big reason for what? What you state is true, but I don't see it having any relevance. The RTL generated is always customized for a machine, so writing RTL would not allow one to split off a backend into a separate program. Tree structures are mostly machine-independent (but not fully, since size information is encoded into them), but GCC does not operate by forming a tree for a function and then compiling it (the interface from the front end to the rest of the compiler is more procedural), so "writing the tree" out is not meaningful since it never exists. Some front-ends to GCC (most notably those for Fortran and Ada) operate by generating a separate tree structure (usually in a different format) for a function or file and then walking that tree by making calls to GCC. In such a case it indeed is somewhat possible to write out such a tree and separate the front end from GCC. I can't speak for Fortran, but can say this is now impractical for Ada. As part of the bootstrap process, this used to be done, but there are now numerous calls from the tree walk routines back into the Ada front end. Also, the tree is not machine-independent because sizes of predefined types are machine-specific. (Aside from the reason given by Mark, it would also be inefficient to do this split due to the amount of I/O required, so this is not only not easy but undesirable.)