[llvm] r194950 - [block-freq] Add BlockFrequency::scale that returns a remainder from the division and make the private scale in BlockFrequency more performant.

Michael Gottesman mgottesman at apple.com
Sat Nov 16 20:03:10 PST 2013


The reason why I wanted to mention N/D here is I wanted to be 100% clear where the remainder was coming from. Would this be clearer?

>   /// \brief Scale the given BlockFrequency by BranchProbability Prob = N/D. Return the remainder from
> +  /// the division by D. Upon overflow, the routine will saturate.


Michael

On Nov 16, 2013, at 7:56 PM, Chandler Carruth <chandlerc at google.com> wrote:

> 
> On Sat, Nov 16, 2013 at 7:25 PM, Michael Gottesman <mgottesman at apple.com> wrote:
> +  /// \brief Scale the given BlockFrequency by N/D. Return the remainder from
> +  /// the division by D. Upon overflow, the routine will saturate.
> +  uint32_t scale(const BranchProbability &Prob);
> +
> 
> There is no N or D here really. I would explain this more in terms of Prob?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131116/79080595/attachment.html>


More information about the llvm-commits mailing list