This is the mail archive of the gcc-patches@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: loop.c: n_times_set, n_times_used


> 
>   In message <199812111715.RAA06423@phal.cygnus.co.uk>you write:
>   > This leaves only combine_givs_used_once as a prospective user of the
>   > usage counts.
> Correct.
> 
>   > And the usage count check there is just overly conservative.
> Why did the original code restrict combination of givs to cases when the
> derived giv was only used once?  Is it possible that the code doesn't
> handle cases where the derived giv is used more than once?  Is is possible
> that in the case of a DEST_ADDR giv that the derived giv is cheaper to compute
> than the giv it is derived from?

I actually wrote the original check in 1996, as a part of combine_givs.
This was under the reign of Kenner, so I made the check - so I thought then -
fairly conservatives, while still doing what I wanted it to do.

Since n_times_used really holds the number of times the register is set
inside the loop, the check never worked correctly.  Most giv registers
are set exactly once in the loop.  The only exception are givs recognized
by consec_sets_giv, i.e. where you have stuff like

      giv = biv * M
      giv = giv + A


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