common sub-expressions
Henry Cejtin
henry@sourcelight.com
Tue, 8 Aug 2000 18:11:23 -0500
Speaking of common subexpression elimination, I was looking at the code
generated for an FFT and it REALLY hurt (maybe not in terms of run-time but
in terms of pain) to see the repeated checks for subscript out of range.
First, the way the code is written it is `clear' that the checks are
unneeded. Ignoring that, what really hurts is code like
Array.update(a, i, x + Array.sub(a, i))
where it checks if i is in range twice.
On an unrelated note, what is the story on not-flattening out array entries?
I.e., if I have an array whose entries are tuples, it is always an extra
level of indirection to get to the entries of the tuple. Why are these never
flattened out?