[llvm-commits] [llvm] r55734 - in /llvm/trunk: include/llvm/LinkAllPasses.h include/llvm/Transforms/IPO.h lib/Transforms/IPO/PartialSpecialization.cpp

Andrew Lenharth andrewl at lenharth.org
Thu Sep 4 07:33:43 PDT 2008


On Thu, Sep 4, 2008 at 1:19 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi,
>> +                 ii->second > total * ConstValPercent ) {
>
> If a function is called less than 10 times, then every call to it
> which has a constant argument somewhere will result in cloning.  Is
> that right?  Isn't that going to result in fat bitcode?

A function must be called more than CallsMin times.  Of the calls, at
least ConstValPercent must be with the same constant.  Alternately,
for every constant that is used more than (in the current version) 10%
of the time, a specialized function is made for it.  These values are
pretty permissive, but so far I see few interesting arguments, and
when I use a more relaxed heuristic (everything is interesting) I
often see a zero or non-constant pattern for arguments.

With the current values, the bitcode for 176.gcc increases 10% as does
255.vortex.  I don't know yet that this pass is actually useful in the
normal case or that I can make a heuristic that works well.

Andrew



More information about the llvm-commits mailing list