Re: g++keeps unused objects with virtual functions

2015-04-08 Thread Richard Biener
On Wed, Apr 8, 2015 at 1:11 AM, Zan Lynx wrote: > On 04/07/2015 09:00 AM, Stefan Ehrlich wrote: >> compiler and linker options are: >> avr-g++.exe -c -Os -Wall -fdata-sections -ffunction-sections >> -fvisibility=hidden -fvisibility-inlines-hidden -fno-rtti -flto >> -fuse-linker-plugin -mmcu=atm

AW: g++keeps unused objects with virtual functions

2015-04-08 Thread Stefan Ehrlich
Dear Richard, Zan, There are no target specifics present. The program will be flashed to the µC via a programmer and that's it. Therefore I want to have the output hex file as small as possible. When I play around with my demo program and the keyword virtual, I can clearly see that the keywork

Re: Question about Gimple FE

2015-04-08 Thread Richard Biener
On Wed, Apr 8, 2015 at 4:48 AM, Yinsong Xue wrote: > On 15/4/7 下午4:33, "Richard Biener" wrote: > >>I still like the idea of using C + extensions most. As well as making the >>-fdump-tree-XXX dumps (more) valid C (+ extensions). Cut & pasting >>from dump files to generate testcases is currently

Re: g++keeps unused objects with virtual functions

2015-04-08 Thread Richard Biener
On Wed, Apr 8, 2015 at 10:02 AM, Stefan Ehrlich wrote: > Dear Richard, Zan, > > There are no target specifics present. The program will be flashed to the µC > via a programmer and that's it. > Therefore I want to have the output hex file as small as possible. > > When I play around with my demo p

Re: g++keeps unused objects with virtual functions

2015-04-08 Thread Jan Hubicka
> which shows how the global objects initialization keeps things live. > Early optimization turns it into > > (static initializers for t.C) () > { > : > NotUsedObject._vptr.CObject = &MEM[(void *)&_ZTV7CObject + 16B]; > return; > > } > > but we don't have any pass removing stores to global

Re: g++keeps unused objects with virtual functions

2015-04-08 Thread Jan Hubicka
> > which shows how the global objects initialization keeps things live. > > Early optimization turns it into > > > > (static initializers for t.C) () > > { > > : > > NotUsedObject._vptr.CObject = &MEM[(void *)&_ZTV7CObject + 16B]; > > return; > > > > } > > > > but we don't have any pass r

Re: Question about Gimple FE

2015-04-08 Thread Yinsong Xue
On 15/4/8 下午4:15, "Richard Biener" wrote: >No. Currently we dump > > : > # i_57 = PHI > # ivtmp_60 = PHI > _65 = (int) ratio_mult_vf.8_45; > tmp.9_64 = i_30 + _65; > tmp.10_66 = ivtmp_33 - ratio_mult_vf.8_45; > if (niters.6_41 == ratio_mult_vf.8_45) >goto ; > else >goto ; > >

AW: g++keeps unused objects with virtual functions

2015-04-08 Thread Stefan Ehrlich
But without the virtual keyword the global object never read is completely removed, so the statement "[...]but we don't have any pass removing stores to globals never read[...]" is only true with virtual functions. When I create the object on the stack, the optimization removes the object even w

Re: g++keeps unused objects with virtual functions

2015-04-08 Thread Richard Biener
On Wed, Apr 8, 2015 at 11:59 AM, Stefan Ehrlich wrote: > But without the virtual keyword the global object never read is completely > removed, so the statement "[...]but we don't have any pass removing stores to > globals never read[...]" is only true with virtual functions. > When I create the

AW: g++keeps unused objects with virtual functions

2015-04-08 Thread Stefan Ehrlich
Dear Richard, The optimization step for doing it does already exist --> it is used for stack variables/objects, but unfortunately not for the global ones. The same optimization should work for the global variables/objects, too. Or am I wrong? Stefan -Ursprüngliche Nachricht- Von: Rich

Re: g++keeps unused objects with virtual functions

2015-04-08 Thread Richard Biener
On Wed, Apr 8, 2015 at 1:23 PM, Stefan Ehrlich wrote: > Dear Richard, > > The optimization step for doing it does already exist --> it is used for > stack variables/objects, but unfortunately not for the global ones. > The same optimization should work for the global variables/objects, too. Or >

AW: g++keeps unused objects with virtual functions

2015-04-08 Thread Stefan Ehrlich
That means, that there is no chance to find this in the next future GCC releases :-( But anyway... Thanks so far Stefan PS: Hope dies last -Ursprüngliche Nachricht- Von: Richard Biener [mailto:richard.guent...@gmail.com] Gesendet: Mittwoch, 08. April 2015 13:27 An: Stefan Ehrlich Cc:

Re: Wierd manual link and resulting dead link

2015-04-08 Thread Gerald Pfeifer
Hi James, On Fri, 26 Apr 2013, James Cloos wrote: > The What's New in 4.8 document links to the X86 Built-in Functions > section of the online manual, but its link is dead. > > The working link is: > > > http://gcc.gnu.org/onlinedocs/gcc/X86-Built_002din-Functions.html#X86-Built_002din-Functi

Re: [AArch64] Missed vectorization opportunity in cactusADM

2015-04-08 Thread James Greenhalgh
On Thu, Apr 02, 2015 at 04:20:06AM +0100, Ekanathan, Saravanan wrote: > (I had sent this mail to gcc-help a week ago. Not sure, all GCC developers > are subscribed to gcc-help, so re-sending to GCC development mailing list) > > Hi, > > This looks like a missed vectorization opportunity for one of t

Re: Probably inaccuracy in GCC 4.7.0 documentation.

2015-04-08 Thread Gerald Pfeifer
Hi Roman, On Wed, 16 May 2012, Роман Саженков wrote: > It seems like I've found an inaccuracy in GCC 4.7.0 documentation. It is > about -fdefer-pop optimization option. The point is that this option is > mentioned in the list of optimization flags which -O1 turns on (Chapter > 3: GCC Command Op

Re: Updating the simtest-howto

2015-04-08 Thread Gerald Pfeifer
On Sun, 30 Dec 2012, Cynthia Rempel wrote: > I was looking at http://gcc.gnu.org/simtest-howto.html and was wondering > if the bottom of the page could be modified from links to tests ran in > 2003 to a link to testresults with a search for sim, like > http://gcc.gnu.org/cgi-bin/search.cgi?wm=wr

libgomp: gomp_new_team() use free list?

2015-04-08 Thread Sebastian Huber
Hello, I work currently on the libgomp support for the RTEMS operating system. It uses the POSIX configuration and it works all right so far. One problem is that each GOMP_parallel() invocation calls gomp_new_team() which uses malloc() and initializes a couple of mutex, barrier and semaphore

Re: Updating the simtest-howto

2015-04-08 Thread Hans-Peter Nilsson
On Wed, 8 Apr 2015, Gerald Pfeifer wrote: > On Sun, 30 Dec 2012, Cynthia Rempel wrote: > > I was looking at http://gcc.gnu.org/simtest-howto.html and was wondering > > if the bottom of the page could be modified from links to tests ran in > > 2003 to a link to testresults with a search for sim, lik

gcc-4.9-20150408 is now available

2015-04-08 Thread gccadmin
Snapshot gcc-4.9-20150408 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.9-20150408/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.9 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/branches