mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-28 07:17:32 +00:00
improve portability to systems that don't have powf/modf (e.g. solaris 9)
patch by Evzen Muller! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103876 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1634,7 +1634,7 @@ LiveIntervals::getSpillWeight(bool isDef, bool isUse, unsigned loopDepth) {
|
||||
// overflow a float. This expression behaves like 10^d for small d, but is
|
||||
// more tempered for large d. At d=200 we get 6.7e33 which leaves a bit of
|
||||
// headroom before overflow.
|
||||
float lc = powf(1 + (100.0f / (loopDepth+10)), (float)loopDepth);
|
||||
float lc = std::pow(1 + (100.0f / (loopDepth+10)), (float)loopDepth);
|
||||
|
||||
return (isDef + isUse) * lc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user