[LLVMdev] Is there a "callback optimization"?
kennethuil at gmail.com
Fri Jun 4 11:57:21 PDT 2010
> As the number of callsites using the same constant grows, inlining
> gets more expensive while specializing does not - the cost of
> specializing only grows with the number of unique constants combos
> specialized. So cases where you'd want to specialize but not inline
> shouldn't be all that uncommon, and different cost calculations are
> needed to set the threshold.
> I didn't see the partial specialization pass in the docs, but I'll
> take a look at it now.
Partial specialize is exactly what I need! Thanks!
It has a bug, though... I put in three calls using one function
pointer, and three calls using another function pointer, and it
created both specializations but changed all the callsites to use the
first specialization. I'll svn update, try again, and file a bug if
More information about the llvm-dev