[PATCH] D26855: New unsafe-fp-math implementation for X86 target

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 23 08:50:03 PST 2016


davide added a comment.

In https://reviews.llvm.org/D26855#630340, @avt77 wrote:

> Yes, I've just got the numbers. I created 2 versions of clang compiler: directly from trunk and with my patch applied. Then with help of these compilers I created 2 new compilers with the following configuration:
>
> cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=<trun/patch compiler home>/build/bin/clang -DCMAKE_CXX_COMPILER=<trunk/patch compiler home>/build/bin/clang++ -DCMAKE_C_FLAGS="-O3 -ffast-math" -DCMAKE_CXX_FLAGS="-O3 -ffast-math"  ../llvm
>
> Below you can see the times (I did 2 experiments for every compiler):
>
>  *******************
>
> Compiler with patch
>
>  ********************
>
> real  32m10.783s
>  user  125m19.424s
>  sys 3m8.456s
>
> ====================================================================================================
>
> real  31m20.432s
>  user  122m2.012s
>  sys 3m4.444s
>
>  ********************
>
> Trunk based compiler
>
>  ********************
>
> real  31m46.001s
>  user  123m39.192s
>  sys 3m10.180s
>
> real  40m6.791s
>  user  156m5.472s
>  sys 3m36.476s
>
> Of course it's very rough estimations because I used our server and there a lot of things around. But general picture is clear from my point of view: my patch does not increase the compilation time.
>  Is it enough or I should do other experiments?


I'll let Simon decide but these numbers are iffy. I can't necessarily conclude your patch increases compile time but I can't conclude anything else either. In particular, the stock clang measurement have a variance of 20% between consecutive runs, so I have very little faith in the numbers collected.
Rafael recent('ish)ly published a set of suggestions/knob to turn on to get relatively stable numbers on a Linux machine. I'm also pretty sure the topic of how to get {reliable numbers, numbers you can have faith in} has been discussed multiple times (look at the archives, Sean has generally pretty informative posts/insights on the topic).


https://reviews.llvm.org/D26855





More information about the llvm-commits mailing list