Related articles |
---|
Modularize compiler construction? pengyu.ut@gmail.com (Peng Yu) (2010-01-23) |
Re: Modularize compiler construction? kkylheku@gmail.com (Kaz Kylheku) (2010-01-24) |
Re: Modularize compiler construction? cr88192@hotmail.com (BGB / cr88192) (2010-01-24) |
Re: Modularize compiler construction? cr88192@hotmail.com (cr88192) (2010-01-25) |
Re: Modularize compiler construction? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2010-01-25) |
Re: Modularize compiler construction? pengyu.ut@gmail.com (Peng Yu) (2010-01-25) |
Re: Modularize compiler construction? idbaxter@semdesigns.com (Ira Baxter) (2010-01-28) |
Re: Modularize compiler construction? gneuner2@comcast.net (George Neuner) (2010-01-28) |
Re: Modularize compiler construction? ott@mirix.org (Matthias-Christian Ott) (2010-01-31) |
Re: Modularize compiler construction? cr88192@hotmail.com (BGB / cr88192) (2010-01-31) |
Re: Modularize compiler construction? gneuner2@comcast.net (George Neuner) (2010-02-01) |
Re: Modularize compiler construction? sh006d3592@blueyonder.co.uk (Stephen Horne) (2010-02-08) |
From: | George Neuner <gneuner2@comcast.net> |
Newsgroups: | comp.compilers |
Date: | Thu, 28 Jan 2010 17:13:04 -0500 |
Organization: | A noiseless patient Spider |
References: | 10-01-080 10-01-082 10-01-090 |
Keywords: | design, GCC |
Posted-Date: | 31 Jan 2010 01:12:43 EST |
On Mon, 25 Jan 2010 12:32:59 -0800 (PST), Peng Yu
<pengyu.ut@gmail.com> wrote:
>... I don't think GCC's internal structure is very accessible for a
>new compiler building programmer to build a new compiler, as I don't
>find documentation on GCC internal library structure. Do you know if
>such documentation is available?
Google "GCC internals".
>It would be more convenient if there
>is a library that can be extracted from GCC as stand-along and well
>documentation API so that new compilers can be built be putting
>together different modules. But I don't see how to do so with GCC.
AFAIK, there isn't any real way to isolate IR passes in GCC except to
examine the source and do it manually. Many of the optimization
passes are run several times when enabled and there really isn't any
centralized way to control them - the compiler "switches" hook into
the code in many places.
Also, in the interest of efficiency, GCC (like most real world
compilers) tries to combine non-conflicting operations to reduce the
number of passes over the IR data. Although the actual code that does
the analysis or optimization isn't terribly difficult to find, it is
sometimes hard to figure out how and where it is controlled.
>Would you please let me know how to do so if you think that using GCC
>is a viable approach?
LLVM's compiler kit seems to have pretty good modularization of its
optimization passes. It currently doesn't do as many optimizations as
GCC (or target as many CPUs), but you might find it easier to work
with.
George
Return to the
comp.compilers page.
Search the
comp.compilers archives again.