|Re: Compiler optimizations firstname.lastname@example.org (1990-06-08)|
|From:||email@example.com (David Keppel)|
|Date:||Fri, 8 Jun 90 03:39:18 GMT|
|Organization:||University of Washington, Computer Science, Seattle|
MCCALPIN <firstname.lastname@example.org> 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
Return to the
Search the comp.compilers archives again.