[LLVMdev] Should LLVM JIT default to lazy or non-lazy?
Renato Golin
rengolin at systemcall.org
Wed Oct 28 13:57:52 PDT 2009
2009/10/28 Kenneth Uildriks <kennethuil at gmail.com>:
> If you're creating functions that contain calls to large amounts of
> seldom-used code, (or takes the address of a ton of functions, only a
> few of which end up being used) then lazy JIT is a win regardless of
> how carefully you only JIT what you want to call. I'm not sure how
> frequent a use case this is, though.
Same as when operating on sparse matrices, split the matrix into
smaller pieces and only operate on them. If you have a huge function
(bad design from start), split into smaller functions and only JIT
what's needed, when needed.
It may not be obvious how to split the function? Split the same way
you would lazy-JIT it and you're done. You can even add it as a
FunctionPass after all optimizations are finished.
cheers,
--renato
Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm
More information about the llvm-dev
mailing list