[llvm] r184590 - Revert "BlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with a branch probability."
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Jun 26 11:46:26 PDT 2013
On Jun 26, 2013, at 11:34 AM, Benjamin Kramer <benny.kra at gmail.com> wrote:
>
> On 25.06.2013, at 20:23, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>
>> This function should compute F*D/N with the normal saturation at UINT64_MAX. The hard part is handling the case where F*D overflows, but F*D/N doesn’t. BlockFrequency.cpp has code to do a 96-bit division.
>
> That should be simple to fix, just give BlockFrequency an operator/ and call the same code operator* does. The 96 bit division code then needs a check to saturate if the result doesn't fit into 64 bits.
That was my thinking.
> Are you working on this or should I take a stab?
I am working on a fix.
Thanks,
/jakob
More information about the llvm-commits
mailing list