[llvm] r223784 - Move function to obtain branch weights into the BranchInst class. NFC.

Xinliang David Li xinliangli at gmail.com
Tue Dec 9 09:16:38 PST 2014


Agree with what Chandler said ..

David

On Tue, Dec 9, 2014 at 8:48 AM, Chandler Carruth <chandlerc at google.com>
wrote:

>
> On Tue, Dec 9, 2014 at 5:36 PM, Juergen Ributzka <juergen at apple.com>
> wrote:
>
>> Author: ributzka
>> Date: Tue Dec  9 10:36:06 2014
>> New Revision: 223784
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=223784&view=rev
>> Log:
>> Move function to obtain branch weights into the BranchInst class. NFC.
>>
>> Make this function available to other parts of LLVM.
>>
>
> I completely disagree with this API change.
>
> Most code should not be accessing branch weights this way. It gives the
> illusion that these can be directly used for deducing profile information
> when they cannot. Only code *updating* branches needs to get at the raw
> metadata. Such code is relatively rare I would expect. Even if we need
> *some* interface on BranchInst to help with the update scenario, this is
> certainly not it. The weights are not restricted to uint64_t in any
> meaningful way, nor are output parameters really appropriate. Nor does this
> interface really help with *updating* the metadata... Maybe I don't
> understand what you're trying to do here?
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141209/c02e7970/attachment.html>


More information about the llvm-commits mailing list