Forked from
Glasgow Haskell Compiler / GHC
idontgetoutmuch
authored
Currently we have this in libraries/base/GHC/Float.hs: ``` abs x | x == 0 = 0 -- handles (-0.0) | x > 0 = x | otherwise = negateFloat x ``` But 3-4 years ago it was noted that this was inefficient: https://mail.haskell.org/pipermail/libraries/2013-April/019690.html We can generate better code for X86 and llvm and for others generate some custom cmm code which is similar to what the compiler generates now. Reviewers: austin, simonmar, hvr, bgamari Reviewed By: bgamari Subscribers: dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D3265
Code owners
Name | Last commit | Last update |
---|---|---|
.. | ||
Dwarf | ||
PPC | ||
RegAlloc | ||
SPARC | ||
X86 | ||
AsmCodeGen.hs | ||
CPrim.hs | ||
Dwarf.hs | ||
Format.hs | ||
Instruction.hs | ||
NCG.h | ||
NCGMonad.hs | ||
NOTES | ||
PIC.hs | ||
PprBase.hs | ||
Reg.hs | ||
RegClass.hs | ||
TargetReg.hs |