This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: is REG_WAS_0 usable in final pass


Bernd Schmidt <bernds@redhat.com> writes:

> On 5 Jun 2001, Denis Chertykov wrote:
> 
> > How about REG_WAS_0 ?
> > Must I disable all REG_WAS_0 based optimizations in avr port ?
> 
> If we remove the note, yes.  Do you have any data regarding how often
> your optimization triggers and what kinds of improvements you get
> from it?

With the REG_WAS_0 I  have an optimized constant loading.
AVR is an 8 bit processor and if I need to load an 8 bit constant then
with the REG_WAS_0 I load only it's nonzero part.

Also it's very effective in the following cases:
{
  long int i = 0;

  if ( foo ())
     i = 1; /* or i = any power of 2 */
}

In such cases I win about (GET_MODE_SIZE (mode-of-i) - 1) bytes.

I like REG_WAS_0.

How many it used:  grep reg_was_0 gcc/config/avr/avr.c




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]