[PATCH] Short-term workaround for hidden x86 float precision in calculateSpillWeightAndHint()

Chandler Carruth chandlerc at google.com
Mon Apr 21 11:27:09 PDT 2014

For the long term...

On Mon, Apr 21, 2014 at 9:39 AM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

>  3. Redesign spill weights to use integers.

This is far and away my preferred approach.

>  4. Change spill weights to use a soft-float.  I happen to have a
>     soft-float implementation lying around here somewhere...

With this as a somewhat distant second.

While I'm sympathetic to Hal's comment, I just don't want to debug LLVM's
behavior on systems with buggy floating point. This will keep coming up,
time and again. What happens when we start forming FMAs in *just* the right
way? No one writing LLVM code is attending to the contraction domains which
avoid unwanted higher precision results, etc.

To address why I prefer to just design spill weights to use integers from
the beginning rather than leverage a soft-float implementation, I genuinely
believe that the design will be simpler and faster as a result. And my
memory is that Jakob had some clear idea of how to map the spill weights
into integers anyways. I'm holding out hope that this is not another place
where we actually *have* to have a floating point representation rather
than a fixed point representation due to massively varying scales.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140421/8ef1c497/attachment.html>

More information about the llvm-commits mailing list