public inbox for gcc-regression@sourceware.org
help / color / mirror / Atom feed
* [TCWG CI] 456.hmmer slowed down by 3% after gcc: c++: split_nonconstant_init and flexarrays
@ 2021-11-18  3:11 ci_notify
  0 siblings, 0 replies; only message in thread
From: ci_notify @ 2021-11-18  3:11 UTC (permalink / raw)
  To: Jason Merrill; +Cc: gcc-regression

After gcc commit 29e4163a092ce08ba3a88a05ac2fa3f23b1cec28
Author: Jason Merrill <jason@redhat.com>

    c++: split_nonconstant_init and flexarrays

the following benchmarks slowed down by more than 2%:
- 456.hmmer slowed down by 3% from 8060 to 8292 perf samples

Below reproducer instructions can be used to re-build both "first_bad" and "last_good" cross-toolchains used in this bisection.  Naturally, the scripts will fail when triggerring benchmarking jobs if you don't have access to Linaro TCWG CI.

For your convenience, we have uploaded tarballs with pre-processed source and assembly files at:
- First_bad save-temps: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-arm-spec2k6-O3_LTO/40/artifact/artifacts/build-29e4163a092ce08ba3a88a05ac2fa3f23b1cec28/save-temps/
- Last_good save-temps: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-arm-spec2k6-O3_LTO/40/artifact/artifacts/build-323026c7dfe23e1093e80f7db5f4851d1a867b62/save-temps/
- Baseline save-temps: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-arm-spec2k6-O3_LTO/40/artifact/artifacts/build-baseline/save-temps/

Configuration:
- Benchmark: SPEC CPU2006
- Toolchain: GCC + Glibc + GNU Linker
- Version: all components were built from their tip of trunk
- Target: arm-linux-gnueabihf
- Compiler flags: -O3 -flto -marm
- Hardware: NVidia TK1 4x Cortex-A15

This benchmarking CI is work-in-progress, and we welcome feedback and suggestions at linaro-toolchain@lists.linaro.org .  In our improvement plans is to add support for SPEC CPU2017 benchmarks and provide "perf report/annotate" data behind these reports.

THIS IS THE END OF INTERESTING STUFF.  BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.

This commit has regressed these CI configurations:
 - tcwg_bmk_gnu_tk1/gnu-master-arm-spec2k6-O3_LTO

First_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-arm-spec2k6-O3_LTO/40/artifact/artifacts/build-29e4163a092ce08ba3a88a05ac2fa3f23b1cec28/
Last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-arm-spec2k6-O3_LTO/40/artifact/artifacts/build-323026c7dfe23e1093e80f7db5f4851d1a867b62/
Baseline build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-arm-spec2k6-O3_LTO/40/artifact/artifacts/build-baseline/
Even more details: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-arm-spec2k6-O3_LTO/40/artifact/artifacts/

Reproduce builds:
<cut>
mkdir investigate-gcc-29e4163a092ce08ba3a88a05ac2fa3f23b1cec28
cd investigate-gcc-29e4163a092ce08ba3a88a05ac2fa3f23b1cec28

# Fetch scripts
git clone https://git.linaro.org/toolchain/jenkins-scripts

# Fetch manifests and test.sh script
mkdir -p artifacts/manifests
curl -o artifacts/manifests/build-baseline.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-arm-spec2k6-O3_LTO/40/artifact/artifacts/manifests/build-baseline.sh --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-arm-spec2k6-O3_LTO/40/artifact/artifacts/manifests/build-parameters.sh --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-arm-spec2k6-O3_LTO/40/artifact/artifacts/test.sh --fail
chmod +x artifacts/test.sh

# Reproduce the baseline build (build all pre-requisites)
./jenkins-scripts/tcwg_bmk-build.sh @@ artifacts/manifests/build-baseline.sh

# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /gcc/ ./ ./bisect/baseline/

cd gcc

# Reproduce first_bad build
git checkout --detach 29e4163a092ce08ba3a88a05ac2fa3f23b1cec28
../artifacts/test.sh

# Reproduce last_good build
git checkout --detach 323026c7dfe23e1093e80f7db5f4851d1a867b62
../artifacts/test.sh

cd ..
</cut>

Full commit (up to 1000 lines):
<cut>
commit 29e4163a092ce08ba3a88a05ac2fa3f23b1cec28
Author: Jason Merrill <jason@redhat.com>
Date:   Mon Nov 15 12:59:08 2021 -0500

    c++: split_nonconstant_init and flexarrays
    
    split_nonconstant_init was doing the wrong thing for both the initialization
    and cleanup here; we know the size from the initializer, and we can pass it
    along.  This doesn't make the testcase work, since the y destructor is still
    broken, but it removes the wrong error for the aggregate initialization.
    
    gcc/cp/ChangeLog:
    
            * typeck2.c (split_nonconstant_init_1): Handle flexarrays better.
    
    gcc/testsuite/ChangeLog:
    
            * g++.dg/ext/flexary37.C: Remove expected error.
---
 gcc/cp/typeck2.c                     | 9 +++++++++
 gcc/testsuite/g++.dg/ext/flexary37.C | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index c01f2f8ced4..e98fbf7f5fa 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -484,6 +484,15 @@ split_nonconstant_init_1 (tree dest, tree init, bool nested)
 	   && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type))
 	  || vla_type_p (type))
 	{
+	  if (!TYPE_DOMAIN (type)
+	      && TREE_CODE (init) == CONSTRUCTOR
+	      && CONSTRUCTOR_NELTS (init))
+	    {
+	      /* Flexible array.  */
+	      cp_complete_array_type (&type, init, /*default*/true);
+	      dest = build1 (VIEW_CONVERT_EXPR, type, dest);
+	    }
+
 	  /* For an array, we only need/want a single cleanup region rather
 	     than one per element.  */
 	  tree code = build_vec_init (dest, NULL_TREE, init, false, 1,
diff --git a/gcc/testsuite/g++.dg/ext/flexary37.C b/gcc/testsuite/g++.dg/ext/flexary37.C
index ceb5053de2e..5cd48c1f773 100644
--- a/gcc/testsuite/g++.dg/ext/flexary37.C
+++ b/gcc/testsuite/g++.dg/ext/flexary37.C
@@ -12,4 +12,4 @@ public:
 
 struct y { // { dg-error "unknown array size in delete" }
     int a; C b[];
-} y = { 1, { { 2, 3 } } }; // { dg-error "unknown array size in delete" }
+} y = { 1, { { 2, 3 } } };
</cut>
>From hjl@sc.intel.com  Thu Nov 18 05:06:15 2021
Return-Path: <hjl@sc.intel.com>
X-Original-To: gcc-regression@gcc.gnu.org
Delivered-To: gcc-regression@gcc.gnu.org
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by sourceware.org (Postfix) with ESMTPS id A9C5A3858402
 for <gcc-regression@gcc.gnu.org>; Thu, 18 Nov 2021 05:06:13 +0000 (GMT)
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A9C5A3858402
X-IronPort-AV: E=McAfee;i="6200,9189,10171"; a="234057039"
X-IronPort-AV: E=Sophos;i="5.87,243,1631602800"; d="scan'208";a="234057039"
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 17 Nov 2021 21:06:12 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.87,243,1631602800"; d="scan'208";a="536562883"
Received: from scymds02.sc.intel.com ([10.82.73.244])
 by orsmga001.jf.intel.com with ESMTP; 17 Nov 2021 21:06:11 -0800
Received: from gnu-34.sc.intel.com (gnu-34.sc.intel.com [172.25.70.212])
 by scymds02.sc.intel.com with ESMTP id 1AI56BW2001063;
 Wed, 17 Nov 2021 21:06:11 -0800
Received: by gnu-34.sc.intel.com (Postfix, from userid 1000)
 id 9ED55640CE; Wed, 17 Nov 2021 21:06:11 -0800 (PST)
Date: Wed, 17 Nov 2021 21:06:11 -0800
To: skpgkp2@gmail.com, hjl.tools@gmail.com, gcc-regression@gcc.gnu.org
Subject: Regressions on master at commit r12-5359 vs commit r12-5347 on
 Linux/x86_64
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20211118050611.9ED55640CE@gnu-34.sc.intel.com>
From: "H.J. Lu" <hjl@sc.intel.com>
X-Spam-Status: No, score=-3469.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
 KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_NONE,
 TXREP autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: gcc-regression@gcc.gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Gcc-regression mailing list <gcc-regression.gcc.gnu.org>
List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-regression>,
 <mailto:gcc-regression-request@gcc.gnu.org?subject=unsubscribe>
List-Archive: <https://gcc.gnu.org/pipermail/gcc-regression/>
List-Post: <mailto:gcc-regression@gcc.gnu.org>
List-Help: <mailto:gcc-regression-request@gcc.gnu.org?subject=help>
List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-regression>,
 <mailto:gcc-regression-request@gcc.gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Nov 2021 05:06:15 -0000

New failures:
FAIL: gcc.dg/guality/pr36728-4.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 14 y == 2
FAIL: gcc.dg/guality/pr36728-4.c   -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr36728-4.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 2

New passes:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-18  3:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18  3:11 [TCWG CI] 456.hmmer slowed down by 3% after gcc: c++: split_nonconstant_init and flexarrays ci_notify

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).