[cfe-commits] [PATCH] Add -fobjc-direct-class-refs

Eli Friedman eli.friedman at gmail.com
Mon May 14 12:08:21 PDT 2012

On Mon, May 14, 2012 at 11:44 AM, Jonathan Schleifer <js at webkeks.org> wrote:
> Am 14.05.2012 um 20:34 schrieb John McCall:
>> If the GNU runtime supports emitting direct references to the class, why is a command-line option necessary?
> The GNU runtime does not. The GNUstep runtime does and mine does.
> It needs to be an option as this is not even part of the new, non-fragile ABI. So when compiling against the GNUstep or my runtime, this flag can be used to directly reference classes - this makes for more than a 2x speedup in real world application. This also means this is independent on whether you use the fragile or non-fragile ABI. You might want to use the fragile ABI with -fobjc-direct-class-refs for maximum performance.
>> I am opposed to providing an ever-expanding spectrum of command line flags — particularly driver flags! — to slightly tweak the ABI.
> Then we need a module for each runtime so we have multiple -f*-runtime. CGObjCGNU.cpp would need to be splitted into CGObjCGNU.cpp, CGObjCGNUstep.cpp and CGObjCObjFW.cpp for -fgnu-runtime, -fgnustep-runtime and -fobjfw-runtime - for just a few lines of differences. Is this really better?

I'm not following your objection here: the organization of the code
and the user-visible command-line options are completely independent.


More information about the cfe-commits mailing list