Path: utzoo!attcan!uunet!husc6!spdcc!ima!compilers-sender From: olender@rachmaninov.CS.ColoState.EDU (Kurt Olender) Newsgroups: comp.compilers Subject: Re: Why Can't We Build a C Compiler? Message-ID: <3102@ima.ima.isc.com> Date: 28 Dec 88 17:37:50 GMT References: <3080@ima.ima.isc.com> <3100@ima.ima.isc.com> Sender: compilers-sender@ima.ima.isc.com Reply-To: olender@rachmaninov.CS.ColoState.EDU (Kurt Olender) Organization: Colorado State University, Ft. Collins CO 80523 Lines: 31 Approved: compilers@ima.UUCP David Collier-Brown makes a good point. One of the main factors that makes producing a good+correct code generator so difficult is the huge case analysis required to map a given programming language construct to the best equivalent code on most machine architectures. Wulf makes a good case for reducing this case analysis by proper considerations when designing the architecture of the machine in the first place[1]. This does not imply a CISC philosophy. He argues that it is not the semantic gap but the irregularities and non-orthogonalities in the architecture that dramatically inflates the number of cases with which a code generator must deal. In fact, he claims that hardware designers' attempts to reduce the semantic gap have increased the case analysis required. The higher level operations provided do not always map directly to every language or are too general to always be efficient, so that case analysis is required to determine when the higher level operations are usable or efficient, and when when they are not, to determine what else to do. Half the blame, anyway, goes to the hardware designers. (The other half certainly belongs with language designers and ad hoc semantics.) [1] William A. Wulf, "Compilers and Computer Architecture", Computer, July 1981, pp. 41-48. -------------------------------------------------------- |Kurt Olender | Computer Science Dept. | |olender@cs.colostate.edu | Colorado State Univ. | |303-491-7015 | Fort Collins, CO 80523 | -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU Plausible paths are { decvax | harvard | yale | bbn}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request