From patchwork Tue Nov 17 11:14:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 56781 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1866215lbb; Tue, 17 Nov 2015 03:14:40 -0800 (PST) X-Received: by 10.66.227.102 with SMTP id rz6mr63137771pac.4.1447758880538; Tue, 17 Nov 2015 03:14:40 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id bb1si57493987pbc.69.2015.11.17.03.14.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Nov 2015 03:14:40 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-65015-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libc-alpha-return-65015-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-65015-patch=linaro.org@sourceware.org; dkim=pass header.i=@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=wHIE+/KQ9LEbjdXSh1lM9ihPwkUaa 3xgjpwvPgqJpExCpGzpNUx4VtAqrj3G1hqIawbwnO1QZXF4Ry2dpwbK15N5bQNdA xU3jdwn8OvEuPbnRqdzWFmxlm4+XxX93MQXrhDCMikC8H12i8ucnVIeOCGA2m1CS du1DUqHXZ/x/Bc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=Pqy+awyp6JhXvqzafSaEri8uFh4=; b=LZ9 0aUgMAmyzxq2N+N/U3cwwkGnX+CrHVIMq7FCHxABQ+HWVBPHyqalf/a7lKyviAQQ SNDPK7bhm423kZYk5rRJXNFk34Om8yicZZau1SI6gKwCx8j7h2/yK3ye0oMxmFOe BdtJUC1FVHpDKm5qxoOdLCA0k56XuAzE/JqPc7qA= Received: (qmail 12941 invoked by alias); 17 Nov 2015 11:14:32 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 12928 invoked by uid 89); 17 Nov 2015 11:14:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f43.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=5PygjULYpz3Heha5rJDv28jxiftKRsDrG4T8w7pFr24=; b=R0jVy/jFNfzZEiBsU2FUXejs3s4AFlDt+XwntuDSr/zqjGP3XPDXG57oizwev2RGm7 S8OAnCOaBHm8DAbTt0WD0CaAy7wv//YCXKFo5XSJSo0NUVs1VGMf5/HO+VKEbUYFFQmW 7sQ6Tw5lHeX6CVX+7u7KR/FvD7esgZ+r2tkg32wBSFtuuxkLEyqvqkNdgRo5H0RNHLfh JRmA4/qFxl5vAxn3iy1YtTjPB5hr6M2SSwGWgllb5LkUJT+EwOLFi1wyG4F1af5PHfVs mUef9Tb97EdjE83HhDUJIiF/0Nxc/gZPBIQZQYBlpBcY9ucH1CfHIcc73RfB8oKMBJnE MsNg== X-Gm-Message-State: ALoCoQkqxdP0zDHrEnkxprkgZn8u21YlMf/18SQ7+yweKRnMaUlPjntwhWI4Q/jOetSpXwm3NwPC X-Received: by 10.66.117.199 with SMTP id kg7mr46842960pab.105.1447758868675; Tue, 17 Nov 2015 03:14:28 -0800 (PST) Date: Tue, 17 Nov 2015 16:44:24 +0530 From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [COMMITTED] benchtests: Mark output variables as used Message-ID: <20151117111424.GA27135@linaro-laptop.intra.reserved-bit.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) 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. Siddhesh --- ChangeLog | 5 +++++ benchtests/scripts/bench.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) -- 2.4.3 diff --git a/ChangeLog b/ChangeLog index dd5a2b5..2d53b2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-11-17 Siddhesh Poyarekar + + * benchtests/scripts/bench.py (_print_arg_data): Mark output variables + as used. + 2015-11-16 Florian Weimer * math/test-signgam-finite-c99.c (_Mlong_double_): Undefine. 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))