Re: New badness metric for inliner

2012-11-06 Thread David Miller
From: Jan Hubicka Date: Tue, 6 Nov 2012 22:11:44 +0100 > The attached patch fixes the testcase, so I comitted it as obvious. Hope it > will fix the bootstrap for you. I did not hit this because my bootstrap did > not > have graphite enabled due to lack of proper support libraries. > > Comitted

Re: New badness metric for inliner

2012-11-06 Thread Jan Hubicka
> From: Jan Hubicka > Date: Tue, 6 Nov 2012 22:01:27 +0100 > > > Hmm, this is obvoiusly wrong. All the caller time computation should be > > capped > > to MAX_TIME that should be safe from overflows. > > They are not capped to MAX_TIME. > > They are capped to MAX_TIME * INLINE_TIME_SCALE whic

Re: New badness metric for inliner

2012-11-06 Thread David Miller
From: Jan Hubicka Date: Tue, 6 Nov 2012 22:01:27 +0100 > Hmm, this is obvoiusly wrong. All the caller time computation should be > capped > to MAX_TIME that should be safe from overflows. They are not capped to MAX_TIME. They are capped to MAX_TIME * INLINE_TIME_SCALE which is 10.

Re: New badness metric for inliner

2012-11-06 Thread Jan Hubicka
> From: David Miller > Date: Tue, 06 Nov 2012 13:54:01 -0500 (EST) > > > From: David Miller > > Date: Tue, 06 Nov 2012 13:26:53 -0500 (EST) > > > >> From: Jan Hubicka > >> Date: Tue, 6 Nov 2012 19:21:46 +0100 > >> > >>> The problem here is really that MAX_TIME * MAX_FREQ do not fit into 32bit

Re: New badness metric for inliner

2012-11-06 Thread David Miller
From: David Miller Date: Tue, 06 Nov 2012 14:28:19 -0500 (EST) > Or perhaps we can get away with only using gcov_t for info->time, I'll > give that a try. That gets thing further, but if the edge times add up to such large values it seems we have lots of other potential problems. With info->tim

Re: New badness metric for inliner

2012-11-06 Thread David Miller
From: David Miller Date: Tue, 06 Nov 2012 14:16:32 -0500 (EST) > (gdb) p inline_summary (edge->caller)->time > $1205 = -1044761 This negative value is computed by inline_update_overall_summary(). I added some debugging to dump the entry->time values processed when info->time goes negative: dav

Re: New badness metric for inliner

2012-11-06 Thread David Miller
From: David Miller Date: Tue, 06 Nov 2012 13:54:01 -0500 (EST) > From: David Miller > Date: Tue, 06 Nov 2012 13:26:53 -0500 (EST) > >> From: Jan Hubicka >> Date: Tue, 6 Nov 2012 19:21:46 +0100 >> >>> The problem here is really that MAX_TIME * MAX_FREQ do not fit into 32bit >>> integer. Fixed

Re: New badness metric for inliner

2012-11-06 Thread David Miller
From: David Miller Date: Tue, 06 Nov 2012 13:26:53 -0500 (EST) > From: Jan Hubicka > Date: Tue, 6 Nov 2012 19:21:46 +0100 > >> The problem here is really that MAX_TIME * MAX_FREQ do not fit into 32bit >> integer. Fixed thus. >> >> * ipa-inline.c (compute_uninlined_call_time): Return gcov

Re: New badness metric for inliner

2012-11-06 Thread David Miller
From: Jan Hubicka Date: Tue, 6 Nov 2012 19:21:46 +0100 > The problem here is really that MAX_TIME * MAX_FREQ do not fit into 32bit > integer. Fixed thus. > > * ipa-inline.c (compute_uninlined_call_time): Return gcov_type. > (compute_inlined_call_time): Watch overflows. > (rela

Re: New badness metric for inliner

2012-11-06 Thread Jan Hubicka
> > This broke the bootstrap on sparc: > > /home/davem/src/GIT/GCC/build-sparc32-linux/./prev-gcc/g++ > -B/home/davem/src/GIT/GCC/build-sparc32\ > -linux/./prev-gcc/ -B/usr/local/sparc-unknown-linux-gnu/bin/ -nostdinc++ > -B/home/davem/src/GIT/GCC\ > /build-sparc32-linux/prev-sparc-unknown-linu

Re: New badness metric for inliner

2012-11-05 Thread David Miller
From: Jan Hubicka Date: Mon, 5 Nov 2012 23:19:16 +0100 > Is line 784 for you "gcc_checking_assert (uninlined_call_time >= 0);"? Yes.

Re: New badness metric for inliner

2012-11-05 Thread Jan Hubicka
> > This broke the bootstrap on sparc: > > /home/davem/src/GIT/GCC/build-sparc32-linux/./prev-gcc/g++ > -B/home/davem/src/GIT/GCC/build-sparc32\ > -linux/./prev-gcc/ -B/usr/local/sparc-unknown-linux-gnu/bin/ -nostdinc++ > -B/home/davem/src/GIT/GCC\ > /build-sparc32-linux/prev-sparc-unknown-linu

Re: New badness metric for inliner

2012-11-05 Thread David Miller
This broke the bootstrap on sparc: /home/davem/src/GIT/GCC/build-sparc32-linux/./prev-gcc/g++ -B/home/davem/src/GIT/GCC/build-sparc32\ -linux/./prev-gcc/ -B/usr/local/sparc-unknown-linux-gnu/bin/ -nostdinc++ -B/home/davem/src/GIT/GCC\ /build-sparc32-linux/prev-sparc-unknown-linux-gnu/libstdc++-