mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
benchtests: Mark output variables as used
Prevent function calls that don't return anything from being optimized out by the compiler by marking its input variables as used. This prevents the sincos function call from being optimized out in the benchmark.
This commit is contained in:
parent
b43e85786f
commit
4916acd87b
@ -1,3 +1,8 @@
|
||||
2015-11-17 Siddhesh Poyarekar <siddhesh.poyarekar@linaro.org>
|
||||
|
||||
* benchtests/scripts/bench.py (_print_arg_data): Mark output variables
|
||||
as used.
|
||||
|
||||
2015-11-16 Florian Weimer <fweimer@redhat.com>
|
||||
|
||||
* math/test-signgam-finite-c99.c (_Mlong_double_): Undefine.
|
||||
|
@ -164,7 +164,7 @@ def _print_arg_data(func, directives, all_vals):
|
||||
if pos == -1:
|
||||
die('Output argument must be a pointer type')
|
||||
|
||||
outargs.append('static %s out%d;' % (arg[1:pos], i))
|
||||
outargs.append('static %s out%d __attribute__((used));' % (arg[1:pos], i))
|
||||
func_args.append(' &out%d' % i)
|
||||
else:
|
||||
arg_struct.append(' %s volatile arg%d;' % (arg, i))
|
||||
|
Loading…
Reference in New Issue
Block a user