[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Improving in leaps and skips!
From: |
HutchinsonAndy |
Subject: |
Re: [avr-gcc-list] Improving in leaps and skips! |
Date: |
Sun, 20 Mar 2005 13:46:29 -0500 |
Thanks to Bernie for testing the leaps and skip patch, I have found a slight
problem.
The orginal problem I was trying to solve was the inappropraite use of SBRx
instructions when the condition code was known - this produces extra
instructions in loops as SBRx is used to check for LT/GTE 0.
So the new code, only applies the pattern when the jump destination is forward
and withing optimum range.
That works fine. However, SBRx is required when there is any sign test jump
that is outside branch range. For example:
sbrs r3,1
rjmp label
is better than:
tst r3
brpl lab2
rjmp label
lab2:
Bernie had some code that had a few of these - so code did not benefit from my
patch.
The solution is elusive.
The problem is that redundant test instructions are not removed until the final
pass. Matching before that happens runs the real risk of producing unneeded
assembler code.
After/during final its not possible to use any new RTL patterns to mop up any
that remain - unless code peepholes are used. (and we dont want to use those!)
catch 22
If I can tell that the final pass is being run, I could enable the SBRx mop up
pattern - final does appear to include some facility for instruction
recognition - which I might be able to use.
ANY IDEAS!
__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
Netscape. Just the Net You Need.
New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp