Re: [cc65] Optimization possible?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2009-10-24 20:29:41
On Sat, Oct 24, 2009 at 08:29:15PM +0200, Groepaz wrote:
> ah yes ok. by "rule based" i ment the classic peephole optimizer approach by
> matching patterns of code (usually textbased) without further analysis of
> register values, flags etc.

Very old versions of cc65 used this approach, but I've found out quickly that
the results are highly disappointing. cc65 does this, too, but in most cases,
additional information is necessary and used. 

A common case is to know if a register is actually used later. Integer
promotion causes the compiler to execute many operations with integers instead
of chars. If the backend knows that the high byte is never used, it can
simplify many expressions.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat Oct 24 20:37:33 2009

This archive was generated by hypermail 2.1.8 : 2009-10-24 20:37:35 CEST