Related articles |
---|
Re: Compiler optimizations pardo@cs.washington.edu (1990-06-08) |
Newsgroups: | comp.compilers |
From: | pardo@cs.washington.edu (David Keppel) |
References: | <1990Jun7.171359.4020@esegue.segue.boston.ma.us> |
Date: | Fri, 8 Jun 90 03:39:18 GMT |
Organization: | University of Washington, Computer Science, Seattle |
Keywords: | code, optimize |
MCCALPIN <mccalpin@vax1.udel.edu> writes:
>[``ambiguous'' approach advocated by higher-level prog lang designers]
Many languages have operations that have domains for which they have
explicitly undefined behavior. For example in C, the code 'a[i] = i++'
has two interpretations: `j=i++, a[j] = j' and `j=i++, a[i] = j'.
If we want to, we can define an iteration construct `forp i=1..n' that
executes all iterations in parallel. If the programmer needs restricted
semantics, then the programmer restricts them explicitly. The compiler does
not need to second-guess the programmer, the only question is whether the
compiler exploits the information given by the programmer. So, for instance,
we can define `ford i=1..n' to be a `forp' in which all iterations are
executed in an order that satisfies the data dependencies but no other
constraints; again, no second- guessing is needed.
;-D on ( Second-guessing the compiler-compiler ) Pardo
--
pardo@cs.washington.edu
{rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.