Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!gatech!hao!husc6!mit-eddie!uw-beaver!tektronix!cae780!amdcad!amd!intelca!mipos3!omepd!mcg From: mcg@omepd (Steven McGeady) Newsgroups: comp.lang.c Subject: Re: Porting PCC Message-ID: <826@omepd> Date: Thu, 18-Jun-87 14:02:47 EDT Article-I.D.: omepd.826 Posted: Thu Jun 18 14:02:47 1987 Date-Received: Mon, 22-Jun-87 01:43:16 EDT References: <2082@dg_rtp.UUCP> <5975@brl-smoke.ARPA> <6604@ism780c.UUCP> <21214@sun.uucp> <801@omepd> <2663@ulysses.homer.nj.att.com> Reply-To: mcg@omepd.UUCP (Steven McGeady) Organization: Intel Corp., Hillsboro Lines: 49 Summary: PCC -> PCC2 -> QCC -> RCC In article <> (Jerry Schwarz) writes: >In article <801@omepd> mcg@omepd.UUCP (Steven McGeady) writes: >> >>QCC and RCC are almost the same thing. ... >> >McGeady is confusing rcc with pcc2. Pcc2 was the version that >did the code selection based on costs. The "r" in rcc stands for >"register". > >Jerry Schwarz >Former member of AT&T UNIX Language Department Mr. Schwarz is correct. My confusion resulted from seeing only the end product, not the genealogy. The correct story is, to quote from an AT&TIS memo (dated June 30, 1985, by David M. Kristol): "PCC2, a successor to the Portable C Compiler (PCC), has itself spawned two successors, QCC and RCC. QCC is a compiler technology that has the favorable maintainability properties of PCC2, along with faster compilation speed than PCC or PCC2. RCC, in turn, is a derivative of QCC that can deal with irregular architectures through the definition of *register sets*. To create a RCC compiler from a PCC2 compiler, it is easiest to go through the intermediate stage of a QCC. The steps are simple, and it is not necessary to get a working QCC, in the sense that it compiles all available C code ..." To give more background, the memo "Speeding up the Portable C Compiler", by David M. Kristol and R.B. Murray, dated February 8, 1985 (and a Bell Labs memo, rather than AT&T IS) says: "PCC2 is an evolutionary outgrowth of PCC, the fundamental difference being the matching algorithm. Since the leaves of the tree correspond to its shapes, PCC begins code generation one level above the leaves. At each step PCC uses the first template it finds for which the OP and shapes in the template match the tree.... PCC2 uses a dynamic programming algorithm to choose the *best set* of templates that represents the semantics of the tree, where *best* is based on a cost measure. The compiler writer supplies costs for templates and shapes. The compiler effectively does an exhaustive search over all possible code generations for a given expression before choosing the cheapest." S. McGeady