[PATCH, C] reduce memory usage for CONSTRUCTORs in global scope variables

Andrew Pinski pinskia@physics.uc.edu
Wed Jul 20 18:18:00 GMT 2005


I noticed that there is we were wasting memory when we output the init
element for arrays.  The problem comes down to copying an INTEGER_CST
which we will not touch after the copy.  The copy is from pre GC so the
INTEGER_CST might have been on a temporary obstack so we needed to copy
it but now we have GC, we don't have this issue.

This patch removes the copy.  This patch also reduces the amount of 
memory
still used after finishing compiling insn-attrtab.c by 14.9% when 
compiling
at -O0.

OK? Bootstrapped and tested on powerpc-darwin with no regressions.


:ADDPATCH C:
Thanks,
Andrew Pinski

ChangeLog:
	* c-typeck.c (output_init_element): Don't copy the INTEGER_CST.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: t.666.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050720/af48ef37/attachment.txt>


More information about the Gcc-patches mailing list