lkml.org 
[lkml]   [2007]   [Nov]   [13]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 13 Nov 2007 07:04:22 +0100
FromAdrian Bunk <>
SubjectRe: [RFC: 2.6 patch] add -fno-tree-scev-cprop to KBUILD_CFLAGS
On Mon, Nov 12, 2007 at 11:07:55PM +0100, Bernd Schmidt wrote:
> Adrian Bunk wrote:
> > It can be a performance regression, but there are also cases where it 
> > can improve performance. If gcc produces lower performance code that
> > would be a bug in gcc that should be reported, but using a division is 
> > not generally wrong.
> > 
> > A more clearer example might be:
> > 
> > <--  snip  -->
> > 
> > void foo(u64 ns)
> > {
> > 	if (ns < 10000)
> > 		return;
> > 
> > 	while(ns >= 3) {
> > 		ns -= 3;
> > #ifdef DEBUG
> > 		bar(ns);
> > #endif
> > 	}
> > }
> > 
> > <--  snip  -->
> > 
> > With DEBUG not defined you can hardly argue gcc should be fixed to not 
> > use a division for performance reasons.
> 
> Absent any clear information about the possible values of ns,
>...

In this example, there is clear information about the possible values
of ns...

> Bernd

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-13 07:07    [from the cache]
©2003-2008