local-alloc update_equiv_regs and moving register initialization

Joern Rennecke amylaar@cygnus.co.uk
Thu Sep 14 16:54:00 GMT 2000


> > consider
> > 
> >     if (i)
> >       c = a + b;
> >     a = i * 3;
> 
> The optimization in question requires that the register be set and used
> exactly once.  I was going with the requirement that the set appear
> prior to the use and known to be executed.

a is set and used exactly once, and the set is known to be executed.
It just happens to come after the use.

Note that you also have to watch out for cases where the set is statically
before the use, but dynamically after the use in loop order.

  goto foo;
bar:
  a = i * 3;
  goto baz;
foo:
  if (i)
    c = a + b;
  goto bar;
baz:


More information about the Gcc mailing list