[PATCH] printf optimization
Tue Jun 4 10:56:00 GMT 2002
In message <firstname.lastname@example.org>, Mark Dettinger
> This is a patch for GCC 3.1 that introduces a printf optimization:
> If possible, then constant arguments are integrated into the format string
> at compile-time.
> Example: printf("%d+%d=%d",1,2,x)
> turns into
> The optimization works on the abstract syntax tree and runs directly before
> -Mark Dettinger
> 2002-06-03 Mark Dettinger (email@example.com)
> 2 Modified Files:
> * toplev.c: add new switches
> * c-decl.c: insert call to printf optimizer
> 5 New Files:
> * md-optimize-printf.h
> * md-optimize-printf.c printf optimizer
> * md-print-tree.h
> * md-print-tree.c outputs trees (for debugging)
> * md-utilities.c useful functions
> The functions contained in the 5 new files are included from c-decl.c.
> They could also be put directly into c-decl.c, of course.
In addition to the comments you've already received, this patch is large
enough that you will need to file a copyright assignment and possibly an
employer disclaimer with the FSF before we can accept any of the code.
More information about the Gcc-patches