This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to add __builtin_printf("string\n") -> puts("string")


 > From: Todd Vierling <tv@pobox.com>
 > 
 > On Fri, 22 Sep 2000, Kaveh R. Ghazi wrote:
 > 
 > : I suppose you could argue that the second string would waste space
 > 
 > It can--meaning that, regardless of this debate, this optimization must have
 > an option to turn it off (or on, if it defaults to off).

You can use -fno-builtin if you want to turn it off with a sledge hammer.

 >   Additionally, a
 > -Os compile must check to see whether the unchopped string is used in the
 > same compilation unit, and not do the transform if so.

Scanning the whole compilation unit is beyond the scope of this work.

Again, in most cases it tends to shrink the size of the unit.
If we find otherwise, I'm willing to have -Os bypass this opt, but
my experience shows the reverse is true.  It is a space win.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]