Prevent optimizing out of benchmark function call
commit48a18de1e1e7dfeab6d034765caaf732b53cfcb7
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 17 May 2013 13:40:33 +0000 (17 19:10 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 17 May 2013 13:40:33 +0000 (17 19:10 +0530)
tree1710f87c334a2d5cc79c30f9262212697eb814ef
parent13d3b41a36c4f28d171a144f8a9baad3a8835981
Prevent optimizing out of benchmark function call

Resolves: #15424

The compiler would optimize the benchmark function call out of the
loop and call it only once, resulting in blazingly fast times for some
benchmarks (notably atan, sin and cos).  Mark the inputs as volatile
so that the code is forced to read again from the input for each
iteration.
ChangeLog
NEWS
benchtests/bench-modf.c
scripts/bench.pl