[Icfp04-discuss] Ant optimizers?

Jed Davis jdev+icfp at xlerb.net
Thu Jun 10 18:30:35 EDT 2004


Michael Levin <milevin at saul.cis.upenn.edu> writes:

> My ant compiler used a simple compilation technique
> "destination-driven code generation" that outputs optimized code
> on the first pass; so there is no need for subsequent
> optimization stages:

The label redirection I added to my preprocessor basically gave me
goto's for free, so generating efficient nested conditionals was easy.

But I was a little surprised to discover while reading this thread
that, on my largest ant, 60 of the 372 lines would be removed by a
single pass of identical instruction elimination.  It turns out to be
From the code that reads a direction from markers and rotates to it;
the code for going from dir 1 to dir 3 is going to share the same last
instruction (Turn Right .whateverlabel-3) as for going from dir 2.


-- 
dn: cn=Jed Davis, o=panix.com  ##          see also jldavis at cs.oberlin.edu
objectclass: person
mail;personal: jdev at panix.com  ##    PGP Key FP:   A098 903E 9B9A DEF4 168F
mail;work:     jld@/           ##  [id 0xF33659F9] AA09 BF07 807E F336 59F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: not available
Url : http://lists.seas.upenn.edu/pipermail/icfp04-discuss/attachments/20040610/6759d64a/attachment.bin


More information about the Icfp04-discuss mailing list