darling-libobjc2/opts
2013-05-16 12:04:18 +00:00
..
ClassIMPCache.cpp Fix the build with LLVM 3.3 and enable building the optimisation passes by 2013-05-16 12:04:18 +00:00
ClassLookupCache.cpp Update opts to work with LLVM trunk (3.3). 2013-01-10 09:22:25 +00:00
ClassMethodInliner.cpp Update opts to work with LLVM trunk (3.3). 2013-01-10 09:22:25 +00:00
CMakeLists.txt Disable RTTI when building LLVM passes. 2013-03-01 14:41:30 +00:00
COPYING Added LLVM optimisation passes for libobjc2. 2010-03-13 18:43:56 +00:00
IMPCacher.cpp Update opts to work with LLVM trunk (3.3). 2013-01-10 09:22:25 +00:00
IMPCacher.h Fix the build with LLVM 3.3 and enable building the optimisation passes by 2013-05-16 12:04:18 +00:00
IvarPass.cpp Update opts to work with LLVM trunk (3.3). 2013-01-10 09:22:25 +00:00
LLVMCompat.h Fix the build with LLVM 3.3 and enable building the optimisation passes by 2013-05-16 12:04:18 +00:00
LoopIMPCachePass.cpp Fix the build with LLVM 3.3 and enable building the optimisation passes by 2013-05-16 12:04:18 +00:00
ObjectiveCOpts.cpp Update opts to work with LLVM trunk (3.3). 2013-01-10 09:22:25 +00:00
ObjectiveCOpts.h Get the libobjc2 optimisations building again with LLVM trunk. 2011-08-16 12:58:44 +00:00
README Added LLVM optimisation passes for libobjc2. 2010-03-13 18:43:56 +00:00
TypeFeedback.cpp Fix the build with LLVM 3.3 and enable building the optimisation passes by 2013-05-16 12:04:18 +00:00
TypeFeedbackDrivenInliner.cpp Update opts to work with LLVM trunk (3.3). 2013-01-10 09:22:25 +00:00
TypeInfoProvider.h Update opts to work with LLVM trunk (3.3). 2013-01-10 09:22:25 +00:00

GNUstep Runtime Optimisations
=============================

This directory contains LLVM optimisations specific to libobjc2.  To build
them, you must copy this directory to llvm/lib/Transforms/GNURuntime (where
llvm is the root of your llvm checkout).

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.

Non-Fragile Ivar Pass
---------------------

Running `opt -gnu-nonfragile-ivar` will invoke the non-fragile instance
variable lowering pass.  This will turn non-fragile instance variable accesses,
which go via one or two indirection layers, into more fragile ones.  If a class
and all of its superclasses are present in the module then this pass will turn
indirect instance variable accesses into hard-coded ones.

For this pass to be most useful, it should be run as a link-time optimisation.

Type Feedback
-------------

Running `opt -gnu-objc-type-feedback` enables type feedback.  Objective-C
message lookups will be replaced by calls to the profiling version in the
runtime library.  The generated data can then be used for future optimisations
(speculative inlining, polymorphic inline caching, and so on), which have not
yet been written.