This is the mail archive of the gcc@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 suggest putc/fputs over printf("string") or printf("\n")


 > From: Jeffrey A Law <law@hurl.cygnus.com>
 >  
 >   >     Can we _split_ instructions at the tree level?  That would allow
 >   > us to do a split_printfs phase eventually. 
 > 
 > Not easily.  Or more correctly, they are split up as part of expansion
 > of arguments.  However, there's not a good way to get a handle on the
 > sub-calls since they're converted from tree to rtl by recursion. 


	I'm not sure what you mean, but I'm talking about splitting:

 > printf("hello world %s", foo);

into:

 > fputs("hello world ", stdout);
 > fputs(foo, stdout);

I'm guessing here, but I would think that should be doable by whatever
mechanism inlining uses. 

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Icon CMT Corp.


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