[LLVMdev] Is there a "callback optimization"?
c.r1 at gmx.de
Fri Jun 4 13:01:53 PDT 2010
> 1) Knowing when to perform specialization. If the call was not inlined
> the function is probably big. Getting this wrong will generate *a lot*
> of code for very small (if not negative) speed gain.
Could you elaborate why just having (lots of) more code in the final
executable will incur a performance _penalty_?
I was thinking of something similiar, but for type-specializations of
functions of a dynamicly-typed language, so that the frontend creates
more than one function for each function in the sourcecode.
> 2) Sharing of specializations from different call sites that have the
> same constants.
> Getting 1) right is crucial but hard. Easy cases are already taken by
> inline and dead argument elimination. If some good profiling
> information is available it can be used for speed/space trade off
> estimation (specialize calls from hot code).
More information about the llvm-dev