[PATCH] Consider error-reporting calls cold in BPI
meadori at codesourcery.com
Tue Nov 12 06:52:52 PST 2013
On 11/12/2013 02:27 AM, Chandler Carruth wrote:
> While I deeply question the fundamental design here, I suspect your patch should
> follow it.
To some degree I have come to regret keeping the class per optimization approach
when I did the work to merge the library call simplifier into instcombine. At
this point I do think it would be simpler to ditch the classes in favor of
static functions (the extra infrastructure and lack of any meaningful per-object
state makes it not worth the trouble). I poke around with that and see what it
> Bah, maybe just put this in a couple of static function and use a more boring
> design? Seems simpler.
I guess for now something where the bulk of the logic is put in static
functions that can be used from PrintFOpt, FWriteOpt, FPutsOpt and
ErrorReportingOpt seems reasonable. ErrorReportingOpt has to stick around for
the perror, vfprintf, fiprintf, and fputc cases.
CodeSourcery / Mentor Embedded
More information about the llvm-commits