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

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 22:17:50 PST 2015


silvas added a subscriber: silvas.
silvas added a comment.

In http://reviews.llvm.org/D14547#286382, @davidxl wrote:

> Thanks -- this is a good functionality.
>
> A high level comment about the command line syntax. I think we can do it without introducing a new option. All that needed for user is to add an optional weight suffix to the input file name such as:
>
> llvm-profdata  merge -o outp.profdata  input1.data:10 input2.data:5 input3.data
>
> When the :weight suffix is missing, the weight is assumed to be 1.
>
> Note that this will like to simplify the implementation quite a bit -- not special parsing is needed.


I agree with David here. The suffix approach seems a lot more robust and convenient. The only requirement is being able to assume that `:` doesn't appear in filenames, which might be a problem on windows, but that can probably be mitigated by checking that it is of the form `:<decimal integer>` I think.


http://reviews.llvm.org/D14547





More information about the llvm-commits mailing list