avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Where is the peephole optimizer?


From: Ben Jackson
Subject: Re: [avr-gcc-list] Where is the peephole optimizer?
Date: Wed, 27 Jul 2005 10:04:06 -0700
User-agent: Mutt/1.5.6i

On Wed, Jul 27, 2005 at 10:08:32AM +0200, Haase Bjoern (PT-BEU/EMT) * wrote:
> Try the options -morder1 and -fnew-ra. The problem is related, IIRC, to the 
> definition of MODES_TIEABLE that is contained in the compiler's source file
>  gcc/gcc/config/avr/avr.h

Thanks for the tip.  With those on, the integer loads for the __floatsisf
look like what you'd expect.  It's still unfortunate that it loads them
in that order, since the overall flow is now:

        r25-22 <= long value
        call __floatsisf
        r17-14 <= r25-22        << could have avoided this
        r25-22 <= other long
        call __floatsisf
        r21-18 <= r25-22
        r25-22 <= r17-14        << and this
        call div

Or maybe div should take its arguments in the other order if the compiler
is predisposed to generating them that way?

> . You could also define MODES_TIEABLE to be 1. This also should fix the 
> problem. The issue is fixed in 4.0.x .

Thanks, I will also build 4.0.x later and compare the results.

Also, in response to the fixed-point suggestion:  My natural tendancy
is to conserve resources (and thus use fixed-point and have lots of
space left over in the part) but I'm trying to speed up my development
by letting go of my fear of a 2046 (of 2048) byte hex file.  If it
fits and it runs fast enough, I'm much better off letting the compiler
(and/or libraries) do the work than doing it myself.

Thanks.

-- 
Ben Jackson
<address@hidden>
http://www.ben.com/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]