[plt-scheme] dead code elimination/closure optimization?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Apr 8 23:52:18 EDT 2007

At Sat, 7 Apr 2007 22:05:48 -0400 (EDT), Dimitris Vyzovitis wrote:
> For the profitable part, it is not that you write this code by hand
> normally; but it may be generated by macros and it can become pretty
> expensive (relative to the code in the body).

I agree. I double-checked the Macro-Writer's Bill of Rights, and
dead-code elimination seem to be the one part of the Guaranteed
Optimization Clause that is not sufficiently satisfied by MzScheme.

I'll have to learn some more about compilers, but I put this on my list
of things to fix in the near future.

> > also the optimizer
> > does iterate to a fixed point already, iiuc.)
> >
> 
> Uhm, shouldn't the 'this removal comes later' part get fixed then?

Right. There is a fixed-point calculation or two in the current
optimizer, but not in general. And simply iterating the current
optimizer pass is likely to be too expensive.

Matthew



Posted on the users mailing list.