discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: building llvm optimizations for libobjc2


From: Sebastian Reitenbach
Subject: Re: building llvm optimizations for libobjc2
Date: Thu, 08 Dec 2011 16:24:09 +0100
User-agent: SOGoMail 1.3.10

On Thursday, December 8, 2011 16:03 CET, David Chisnall <theraven@sucs.org> 
wrote:

> On 8 Dec 2011, at 14:48, Sebastian Reitenbach wrote:
>
> > So, now I have a lib/libGNUObjCRuntime.so file installed, but wonder a bit, 
> > how to make use of it ;)
>
> The closest thing to documentation for it currently is this blog post:
>
> http://etoileos.com/news/archive/2011/05/14/1829/
>
> It shouldn't need any documentation.  Eventually it will be used by front 
> ends automagically if it's installed.
>
> > The README states:
> > Running GNU make will then create GNUObjCRuntime.so.  This library can be
> > passed to opt to run optimisations on bitcode generated with clang or
> > LanguageKit.
>
> LanguageKit will use it automatically if it's present.  Clang can be told to 
> use it with -Xclang -load -Xclang /path/to/libGNURuntime.so
>
> GNU people can probably invoke it from gold for link-time optimisation as 
> well, but I've never tried.
>
> > but unfortunately, this doesn't tells me much :(
> >
> > man opt tells me, its the llvm optimizer,
> > reading further, I should do
> > opt -load=libGNUObjCRuntime.so -gnu-nonfragile-ivar -gnu-objc-type-feedback 
> > <inputfile>
>
> You can do that too, although if it's built against LLVM 3 or later it will 
> automatically add the optimisations in sensible points at the default places 
> for
>
> > but what is the inputfile, would it be libgnustep-base.so.X.X ??
> > Shall I need to do this for libraries, binaries, or both?
> > Can gnustep-make do this for me "automagically" when I give an environment 
> > variable?
>
> Well, you can set OBJCFLAGS="-Xclang -load -Xclang /path/to/libGNURuntime.so" 
> and it should Just Work™.  It's nowhere near as well tested as the rest of 
> the runtime or compiler though, so I'm a bit hesitant about enabling it by 
> default.  I've compiled all of -base with it and run the tests though, so 
> more testing is definitely appreciated (as are bug reports with - ideally, 
> reduced - test cases).

Thanks a lot, then I think the OBJCFLAGS way is the way I'll need to go. Since 
you say yourself its not well tested, I'll keep the patch for llvm for myself 
for the time being, going on with compiling and testing. If you don't here back 
from me, assume it just works, or well, be prepared to be bugged with problems 
;)

thanks a lot.
Sebastian

>
> > Or, where do I find the RTFM on that topic?
>
> Currently in my brain.  In the LLVM 3.1 timeframe I plan on improving the UI 
> for this, and once it's a bit less ugly I'll document it properly.
>
> David
>
> -- Sent from my Difference Engine







reply via email to

[Prev in Thread] Current Thread [Next in Thread]