Add another interface to function annotateValueSite() which directly uses the VauleData array. This is needed in indirect-call promotion where un-promoted valuedata needs to be updated in the MD.prof meta data.
Details
Diff Detail
Event Timeline
my indirect-call promotion implementation supports multiple targets (specified the by an option) for a single callsite and the transformation pass can be called multiple times. The promotion stops at the first non-promoted direct target (as it's sorted on the count).
For example, for a callsite with the the following valuedata {<func1, 100> <func2, 80> <func3,10>}, after we promote func1 and cannot promote func2, I will attach {<func2, 80> <func3, 10>} to the indirect-call instruction.
Aside from how transformation should be done, I think annotating the remaining indirect call with the right meta data after the transformation is the right thing to do, and the information can be used for later optimizations (such as function layout based on dyn call graph).
LGTM.