diff options
author | Siddhesh Poyarekar <siddhesh.poyarekar@linaro.org> | 2015-11-17 16:01:15 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh.poyarekar@linaro.org> | 2015-11-17 16:01:15 +0530 |
commit | 4916acd87b22351c9d77babf5be71fb8c53d67bd (patch) | |
tree | 71b5f474bef73b9ad10b676ab9a4d90abc8658a2 /benchtests/scripts | |
parent | b43e85786f6a6954c3d750aa2914b6ceecade378 (diff) | |
download | glibc-4916acd87b22351c9d77babf5be71fb8c53d67bd.zip glibc-4916acd87b22351c9d77babf5be71fb8c53d67bd.tar.gz glibc-4916acd87b22351c9d77babf5be71fb8c53d67bd.tar.bz2 |
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.
Diffstat (limited to 'benchtests/scripts')
-rwxr-xr-x | benchtests/scripts/bench.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/benchtests/scripts/bench.py b/benchtests/scripts/bench.py index ee856db..7752c8a 100755 --- a/benchtests/scripts/bench.py +++ b/benchtests/scripts/bench.py @@ -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)) |