Re: Compiler optimizations (David Keppel)
Fri, 8 Jun 90 03:39:18 GMT

          From comp.compilers

Related articles
Re: Compiler optimizations (1990-06-08)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (David Keppel)
References: <>
Date: Fri, 8 Jun 90 03:39:18 GMT
Organization: University of Washington, Computer Science, Seattle
Keywords: code, optimize

MCCALPIN <> 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

Post a followup to this message

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