darling-libobjc2/opts
2010-05-19 14:16:26 +00:00
..
ClassIMPCache.cpp Added unfinished inliner that uses type feedback info to inline instance methods. 2010-05-01 13:56:59 +00:00
ClassLookupCache.cpp Removed debugging code that shouldn't have been in last commit. 2010-04-28 14:47:02 +00:00
ClassMethodInliner.cpp Profile-driven inlining of Objective-C methods. 2010-05-01 18:24:22 +00:00
COPYING Added LLVM optimisation passes for libobjc2. 2010-03-13 18:43:56 +00:00
IMPCacher.cpp Profile-driven inlining of Objective-C methods. 2010-05-01 18:24:22 +00:00
IMPCacher.h Added unfinished inliner that uses type feedback info to inline instance methods. 2010-05-01 13:56:59 +00:00
IvarPass.cpp Added LoopIMPCachePass. This pass automatically performs IMP caching on all loops. 2010-04-27 22:34:15 +00:00
LoopIMPCachePass.cpp Removed some unneeded #includes. 2010-04-28 12:24:03 +00:00
Makefile Rename the library with the lib prefix so it can actually be linked sensibly. 2010-05-09 12:28:36 +00:00
README Added LLVM optimisation passes for libobjc2. 2010-03-13 18:43:56 +00:00
TypeFeedback.cpp Added missing files. 2010-05-19 14:16:26 +00:00
TypeFeedbackDrivenInliner.cpp Added missing files. 2010-05-19 14:16:26 +00:00
TypeInfoProvider.h Added missing files. 2010-05-19 14:16:26 +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.