Inline functions tweeks 1/n

Jeff Law law@redhat.com
Thu Apr 24 21:04:00 GMT 2014


On 01/02/14 10:21, Jan Hubicka wrote:
> Hi,
> While looking for -Winline messages I noticed that sched-int.h has self recursive
> function declared inline.  The recursion is tail recursion but we fail to recognize
> it as such. The problem ist hat there is a local variable link whose address
> is passed to function  &DEPS_LIST_FIRST (list) and we are thus unsure if the
> memory location is dead.
>
> I tried to bring that function inline, too, but it does not help, since alias
> analysis won't figure out that passing the address to a function won't capture
> it because we do not have nocapture discovery in early passes (it may be
> valuable addition).
>
> Anyway, it is easy to turn recursion into iteration here and probably makes
> sense.
>
> Bootstrapped/regtested x86_64-linux, OK?
>
> Honza
>
> 	* sched-int.h (sd_iterator_cond): Manually tail recurse.
OK for the trunk.

jeff



More information about the Gcc-patches mailing list