Re: Making PCC a two-pass compiler

ps@celerity.UUCP (Patricia Shanahan)
1 Aug 88 21:21:21 GMT

          From comp.compilers

Related articles
Making PCC a two-pass compiler leor@pyr.gatech.edu (1988-07-27)
Re: Making PCC a two-pass compiler ps@celerity.UUCP (1988-08-01)
| List of all articles for this month |

From: ps@celerity.UUCP (Patricia Shanahan)
Newsgroups: comp.compilers,comp.lang.c
Keywords: C Compilers, PCC
Date: 1 Aug 88 21:21:21 GMT
References: <1690@ima.ISC.COM>
Distribution: usa
Organization: /usr/lib/news/organization

In article <1690@ima.ISC.COM> leor@pyr.gatech.edu (Leor Amikam) writes:
>HELP!! I'm currently working on a project to write an
>intermediate code optimizer for the UNIX portable C compiler.
>Our system has the compiler set up for a one-pass. I'm having
>greate difficulties generating the two-pass version of pcc.
>Has anyone generated the two-pass version, and how do I do it?
>--


I did this as the first stage in development of Celerity's C compiler. I
found a file called "CONVERT" in the mip directory, containing instructions
for converting from two pass to one pass operation. I reversed all the steps
described in CONVERT, re-made fixing a few problems in the make, and then
debugged the result. As far as I can remember, it took a few days to debug
it.


Most of the problems where duplicated or missing declarations, and once I got
it to complete a compilation it was reliable.


Although it was not especially difficult, it was by no means an automatic
re-generation. I did this in late 1983, based on BSD 4.2 sources. Assuming
you are using more recent sources, I would expect it to be harder.


ps
(Patricia Shanahan)
uucp : ucsd!celerity!ps
arpa : ucsd!celerity!ps@nosc
phone: (619) 271-9940
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.