avr-libc-dev
[Top][All Lists]
Advanced

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

[avr-libc-dev] Re: ... Some (?funny?) experimental results when removing


From: Denis Chertykov
Subject: [avr-libc-dev] Re: ... Some (?funny?) experimental results when removing part of the monolithic SI/HI instruction patterns :-) ...
Date: 11 Mar 2005 08:13:23 +0300
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Björn Haase <address@hidden> writes:

> Hi,
> 
> I'd like to report on some experiments on the AVR back-end that lead to some 
> results, that I think are sufficiently interresting and sufficiently funny to 
> be shared and discussed. This mail is not an urgent request for support, so 
> continue reading only, If you have time and if you are willing and prepared 
> to see weird things :-) : 

[...]

> and that it, thus is useless to perform the first or operation on it. Also 
> the sign extension is almost completely optimized away, except for a remnant 
> QI single mode register r18 that actually is never used. I do not quite 
> understand how this r18 expressions come out . :-) ... And the third weird 
> thing is, that seemingly gcc completely looses track of the registers in use 
> when push/popping r16/r17 ...
> 
> The first conclusion I am drawing is:
> 
> 1.) Removing some of the patterns does not necessarily result in
> worse code.

Yep. :)

> 2.) There seems to persist a problem in the mechanism that keeps track of the 
> used and unused registers. I doubt, whether this problem is also present for 
> the usual back-end *with* the SI/HI mode patterns.

IMHO: It's a problem related to handling of subregs.

> I am just running the test suite with this change and so far I have observed 
> only a small amount of regressions seemingly due to problems with 
> "simplify_subregs".

The "small amount" is *amount*.

> Since I am not too familiar with the history of the back-end:
> 
> Is there a specific original reason why it was neccessary to define the SI 
> and 
> HI mode patterns for the logic operations (I do understand that it was 
> necessary to define plus and minus but why this also for
> and/or/xor?)

Few years ago SI and HI mode patterns was better. May be something
changed inside GCC core.

Generally, GCC have a few optimization passes which work better with
SImode or HImode registers instead of subregs.

Denis.
PS: May be better to keep SI and HI mode registers until reload and split
them only after reload. (You can use "reload_completed" in your
patterns)





reply via email to

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