lkml.org 
[lkml]   [2016]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] ARC: build: Turn off -Wmaybe-uninitialized for ARC gcc 4.8
From
Date
On Friday 18 March 2016 05:43 PM, Arnd Bergmann wrote:
> I think it's dangerous to use -O3 in one architecture when nothing else
> uses it. If you don't have a strong reason to use -O3, maybe just drop that
> use the default -O2 -Wmaybe-uninitialized like everyone else does.

I know what u mean. In fact top level makefile change has bitten us atleast once.
However ARC gcc tends to generate better code (likely others do too) at -O3 and
increased inlining etc reflects in several benchmarks. Maybe its due to the
micro-architecture and smaller hardware call return stack - I'm not sure. So I'm
ready to pay that maintenance price. And it has been like this for 5+ years and I
fear that switching to -O2 might unravel something unwarranted for.

OTOH, I'd rather prefer -O3 for all arches but that ain't gonna happen for obvious
reasons :-)

> On a related note, I have submitted a patch that turns CONFIG_CC_OPTIMIZE_FOR_SIZE
> into a choice statement, so we actually get the -Wmaybe-uninitialized warnings
> in an allyesconfig or allmodconfig build. It would be trivial to extend that
> to give the choice between -Os, -O2 and -O3, and then pick -O3 in a defconfig,
> over the -O2 default.

Is it posted already. I couldn't find it with quick googling.

Thx,
-Vineet

\
 
 \ /
  Last update: 2016-03-18 14:41    [W:0.042 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site