[PATCH] D23619: Refactor metadata copying/swapping code to make it sharable
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 18 09:43:31 PDT 2016
> On 2016-Aug-18, at 09:39, Xinliang David Li <davidxl at google.com> wrote:
>
>> Ok. For the sake of making this NFC, I added more code to deal with
>> it. To make the default path (clone everything) fast, a new interface
>> is added to strip all metadata except those specified in white list.
>> Also added a FIXME there.
>>
>>
>> Having to create an actually vector is a shame. I'd expect to be able to
>> send in {MD_dbg, MD_prof}.
>>
>
> Sure. My assumption was that the stripping should not be used
> frequently and I disliked linear search more. I will make changes to
> simplify the interface.
Linear search is plenty fast when there are few attachments. I'd be surprised if a single instruction ever has enough attachments for linear search to be slow.
But you could avoid a linear search even in those cases if you want to, by adding internal API to support mass updates.
More information about the llvm-commits
mailing list