[PATCH] D14547: [llvm-profdata] Add support for weighted merge of profile data

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 14:57:50 PST 2015


On Tue, Nov 10, 2015 at 2:53 PM, Diego Novillo <dnovillo at google.com> wrote:

>
>
> On Tue, Nov 10, 2015 at 5:44 PM, Xinliang David Li <davidxl at google.com>
> wrote:
>
> pros:
>>
>> 1) the weight and file name are always 'together'. Think about a long
>> list of files -- having a separate list option make it harder to associate
>> and and  can not really skip the default weight of 1, e.g
>> -W10,1,1,1,1,1,1,1,1,1,20
>> 2) there is no need for an additional option
>> 3) the implementation is simpler and requires fewer code.
>>
>> cons:
>> I don't see any real cons -- except that you find it weird -- but why?
>>
>
> It conflates two different concepts.
>

There is no conflation. We can think of the input list be a list of
weighted input files. The formal definition:

A weighted input is specified by the file path of the input profile file
optionally followed by a integer separated with a comma. The integer
specifies the weight of the input profile. If it is missing, the default is
1.

How does this sound?

David



> I tend not to find these situations very appealing.  However, in this
> case, your advantage #1 is compelling (the other 2, not so much).
>
> More comments coming up in the code itself.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151110/a41a4d4c/attachment.html>


More information about the llvm-commits mailing list