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:
Chris Lattner
2010-05-15 17:10:24 +00:00
parent 2c13ab2bb8
commit 87565c1d77
4 changed files with 5 additions and 5 deletions

View File

@@ -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;
}