Re: compilers, in a nutshell

newburn@aslan.ece.cmu.edu (Chris Newburn)
Thu, 12 May 1994 17:42:27 GMT

          From comp.compilers

Related articles
compilers, in a nutshell ellard@endor.harvard.edu (1994-05-09)
Re: compilers, in a nutshell chase@Think.COM (1994-05-09)
Re: compilers, in a nutshell munk@prl.philips.nl (1994-05-10)
Re: compilers, in a nutshell bill@amber.ssd.csd.harris.com (1994-05-11)
Re: compilers, in a nutshell newburn@aslan.ece.cmu.edu (1994-05-12)
| List of all articles for this month |

Newsgroups: comp.compilers
From: newburn@aslan.ece.cmu.edu (Chris Newburn)
Keywords: courses
Organization: Electrical and Computer Engineering, Carnegie Mellon.
References: 94-05-018
Date: Thu, 12 May 1994 17:42:27 GMT

I think that there are two ways of looking at compilers, focusing on either
1) the front end or 2) the back end:


1. A compiler is what parses an input program and spits out
something the target machine can execute.


2. A compiler analyzes a program, trying to understand its
semantics as well as possible, and optimizes the execution of
that program on a particular target machine.


The lexical analysis and parsing technology has been well-developed for
many years. Some would say that it's not very interesting, because it is
a rather mechanical part of the compiler. Having a general understanding
of it is helpful, and will help real engineers and computer scientists
with writing lex and yacc code. But it does not necessarily probe into
the essential relationships between languages, compilers, and
architectures.


For students who will be studying parallelism, designing processors, and
developing compilers in industry, I think a discussion from the second
view is more appropriate.


Granted, time is limited, so in-depth coverage of several topics in 6
hours is tough. But I believe that depending on the curriculum the
students are in, and what they want to use knowledge of compilers for, the
following topics may be of greater interest:


data dependence - provides basis for understanding the operation
of an out-of-order superscalar machine
control flow and control dependence - provides basis for
understanding branch prediction, control-equivalence
simple scheduling methods - provide insight into how a compiler
exposes and exploits parallelism


I hold this particular view because I have helped teach processor design
and architecture courses that include this material, and have done so in
one or two lectures. Students have found it quite helpful in gaining an
understanding of the relationship between languages, compilers, and
architectures.


Chris
--
Chris J. Newburn newburn@ece.cmu.edu
Department of Electrical and Computer Engineering, Carnegie Mellon University
--


Post a followup to this message

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