After gcc commit f18cbc1ee1f421a0dd79dc389bef9a23dd4a761d Author: François-Xavier Coudert Darwin: Future-proof and homogeneize detection of darwin versions the following hot functions slowed down by more than 10% (but their benchmarks slowed down by less than 2%): - 436.cactusADM:[.] PUGH_ReductionMinVal slowed down by 83% from 6 to 11 perf samples - 403.gcc:[.] sbitmap_intersection_of_preds slowed down by 52% from 23 to 35 perf samples - 403.gcc:[.] canon_hash slowed down by 39% from 18 to 25 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_tx1-gnu-master-aarch64-spec2k6-O3/44/artifact/artifacts/build-f18cbc1ee1f421a0dd79dc389bef9a23dd4a761d/save-temps/ - Last_good save-temps: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O3/44/artifact/artifacts/build-2554e2da9263e4e26a164318f8041b19b8e54c21/save-temps/ - Baseline save-temps: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O3/44/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: aarch64-linux-gnu - Compiler flags: -O3 - Hardware: NVidia TX1 4x Cortex-A57 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_tx1/gnu-master-aarch64-spec2k6-O3 First_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O3/44/artifact/artifacts/build-f18cbc1ee1f421a0dd79dc389bef9a23dd4a761d/ Last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O3/44/artifact/artifacts/build-2554e2da9263e4e26a164318f8041b19b8e54c21/ Baseline build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O3/44/artifact/artifacts/build-baseline/ Even more details: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O3/44/artifact/artifacts/ Reproduce builds: mkdir investigate-gcc-f18cbc1ee1f421a0dd79dc389bef9a23dd4a761d cd investigate-gcc-f18cbc1ee1f421a0dd79dc389bef9a23dd4a761d # 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_tx1-gnu-master-aarch64-spec2k6-O3/44/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_tx1-gnu-master-aarch64-spec2k6-O3/44/artifact/artifacts/manifests/build-parameters.sh --fail curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O3/44/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 f18cbc1ee1f421a0dd79dc389bef9a23dd4a761d ../artifacts/test.sh # Reproduce last_good build git checkout --detach 2554e2da9263e4e26a164318f8041b19b8e54c21 ../artifacts/test.sh cd .. Full commit (up to 1000 lines): commit f18cbc1ee1f421a0dd79dc389bef9a23dd4a761d Author: François-Xavier Coudert Date: Fri Dec 17 19:30:36 2021 +0100 Darwin: Future-proof and homogeneize detection of darwin versions The current GCC branch will become 12.1.0, which will be the stable version of GCC when the next macOS version is released. There are some places in GCC that don’t handle darwin22 as a version, so we need to future-proof it (gcc/config.gcc and gcc/config/darwin-driver.c). We align that code with what Apple clang does, i.e. accept all potential major macOS versions until 99. This patch also homogenises the handling of darwin version numbers, where the majority of places use darwin2*, but some used darwin2[0-9]*. Since there never was a darwin2.x version, the two are equivalent, and we prefer the simpler darwin2* gcc/ChangeLog: * config/darwin-driver.c: Make version code more future-proof. * config.gcc: Homogeneize darwin versions. * configure.ac: Homogeneize darwin versions. * configure: Regenerate. gcc/testsuite/ChangeLog: * gcc.dg/darwin-minversion-link.c: Test darwin21. * obj-c++.dg/cxx-ivars-3.mm: Homogeneize darwin versions. * obj-c++.dg/objc-gc-3.mm: Homogeneize darwin versions. * objc.dg/objc-gc-4.m: Homogeneize darwin versions. --- gcc/config.gcc | 4 ++-- gcc/config/darwin-driver.c | 6 +++--- gcc/configure | 2 +- gcc/configure.ac | 2 +- gcc/testsuite/gcc.dg/darwin-minversion-link.c | 3 ++- gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm | 2 +- gcc/testsuite/obj-c++.dg/objc-gc-3.mm | 2 +- gcc/testsuite/objc.dg/objc-gc-4.m | 2 +- 8 files changed, 12 insertions(+), 11 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index c8824367b13..c8c0ef9aa05 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1847,7 +1847,7 @@ hppa[12]*-*-hpux11*) dwarf2=no fi ;; -i[34567]86-*-darwin1[89]* | i[34567]86-*-darwin2[0-9]*) +i[34567]86-*-darwin1[89]* | i[34567]86-*-darwin2*) echo "Error: 32bit target is not supported after Darwin17" 1>&2 ;; i[34567]86-*-darwin*) @@ -1857,7 +1857,7 @@ i[34567]86-*-darwin*) tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch t-slibgcc" tm_file="${cpu_type}/darwin32-biarch.h ${tm_file} " ;; -x86_64-*-darwin1[89]* | x86_64-*-darwin2[01]*) +x86_64-*-darwin1[89]* | x86_64-*-darwin2*) # Only 64b from now tm_defines="${tm_defines} TARGET_64BIT_DEFAULT=(OPTION_MASK_ISA_64BIT|OPTION_MASK_ABI_64)" tm_defines="${tm_defines} TARGET_BI_ARCH=0" diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c index 688fe8fabc0..e459a72f907 100644 --- a/gcc/config/darwin-driver.c +++ b/gcc/config/darwin-driver.c @@ -64,7 +64,8 @@ validate_macosx_version_min (const char *version_str) major = strtoul (version_str, &end, 10); - if (major < 10 || major > 12 ) /* macOS 10, 11, and 12 are known. */ + /* macOS 10, 11, and 12 are known. clang accepts up to 99. */ + if (major < 10 || major > 99) return NULL; /* Skip a separating period, if there's one. */ @@ -160,8 +161,7 @@ darwin_find_version_from_kernel (void) /* Darwin20 sees a transition to macOS 11. In this, it seems that the mapping to macOS minor version is now shifted to the kernel minor - version - 1 (at least for the initial releases). At this stage, we - don't know what macOS version will correspond to Darwin21. */ + version - 1 (at least for the initial releases). */ if (major_vers >= 20) { int minor_vers = *version_p++ - '0'; diff --git a/gcc/configure b/gcc/configure index 5470987b62f..992a9d70092 100755 --- a/gcc/configure +++ b/gcc/configure @@ -26947,7 +26947,7 @@ $as_echo "$as_me: WARNING: LTO for $target requires binutils >= 2.20.1, but vers ;; esac case $target_os in - darwin2[0-9]* | darwin19*) + darwin2* | darwin19*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for llvm assembler x86-pad-for-align option" >&5 $as_echo_n "checking assembler for llvm assembler x86-pad-for-align option... " >&6; } if ${gcc_cv_as_mllvm_x86_pad_for_align+:} false; then : diff --git a/gcc/configure.ac b/gcc/configure.ac index 2b4914b6ec1..0db9c4cb027 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4692,7 +4692,7 @@ foo: nop ;; esac case $target_os in - darwin2[[0-9]]* | darwin19*) + darwin2* | darwin19*) gcc_GAS_CHECK_FEATURE([llvm assembler x86-pad-for-align option], gcc_cv_as_mllvm_x86_pad_for_align, [-mllvm -x86-pad-for-align=false], [.text],, diff --git a/gcc/testsuite/gcc.dg/darwin-minversion-link.c b/gcc/testsuite/gcc.dg/darwin-minversion-link.c index 765fb799a91..b6ede31c985 100644 --- a/gcc/testsuite/gcc.dg/darwin-minversion-link.c +++ b/gcc/testsuite/gcc.dg/darwin-minversion-link.c @@ -15,7 +15,8 @@ /* { dg-additional-options "-mmacosx-version-min=010.013.06 -DCHECK=101306" { target *-*-darwin17* } } */ /* { dg-additional-options "-mmacosx-version-min=010.014.05 -DCHECK=101405" { target *-*-darwin18* } } */ /* { dg-additional-options "-mmacosx-version-min=010.015.06 -DCHECK=101506" { target *-*-darwin19* } } */ -/* { dg-additional-options "-mmacosx-version-min=011.000.00 -DCHECK=110000" { target *-*-darwin20 } } */ +/* { dg-additional-options "-mmacosx-version-min=011.000.00 -DCHECK=110000" { target *-*-darwin20* } } */ +/* { dg-additional-options "-mmacosx-version-min=012.000.00 -DCHECK=120000" { target *-*-darwin21* } } */ int main () diff --git a/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm b/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm index 07123559d72..27bae630ce8 100644 --- a/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm +++ b/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm @@ -2,7 +2,7 @@ // { dg-do run { target *-*-darwin* } } // { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } -// { dg-skip-if "Headers incompatible with 10.4 APIs" { *-*-darwin1[1-9]* *-*-darwin2[0-9]* } { "-fnext-runtime" } { "" } } +// { dg-skip-if "Headers incompatible with 10.4 APIs" { *-*-darwin1[1-9]* *-*-darwin2* } { "-fnext-runtime" } { "" } } // { dg-additional-options "-fobjc-call-cxx-cdtors -mmacosx-version-min=10.4 -framework Foundation" } // This test has no equivalent or meaning for m64/ABI V2 // { dg-xfail-run-if "No Test Avail" { *-*-darwin* && lp64 } { "-fnext-runtime" } { "" } } diff --git a/gcc/testsuite/obj-c++.dg/objc-gc-3.mm b/gcc/testsuite/obj-c++.dg/objc-gc-3.mm index 45ffbc5553d..18f2cbe8869 100644 --- a/gcc/testsuite/obj-c++.dg/objc-gc-3.mm +++ b/gcc/testsuite/obj-c++.dg/objc-gc-3.mm @@ -3,7 +3,7 @@ /* Contributed by Ziemowit Laski */ /* { dg-do compile } */ -/* { dg-skip-if "GC API is an error from Darwin16." { *-*-darwin1[6-9]* *-*-darwin2[0-9]* } { "-fnext-runtime" } { "" } } */ +/* { dg-skip-if "GC API is an error from Darwin16." { *-*-darwin1[6-9]* *-*-darwin2* } { "-fnext-runtime" } { "" } } */ /* { dg-options "-fobjc-gc" } */ /* { dg-prune-output "cc1objplus: warning: '-fobjc-gc' is ignored for '-fgnu-runtime'" } */ diff --git a/gcc/testsuite/objc.dg/objc-gc-4.m b/gcc/testsuite/objc.dg/objc-gc-4.m index 8102a5a532f..1b2d9674969 100644 --- a/gcc/testsuite/objc.dg/objc-gc-4.m +++ b/gcc/testsuite/objc.dg/objc-gc-4.m @@ -3,7 +3,7 @@ /* Contributed by Ziemowit Laski */ /* { dg-do compile } */ -/* { dg-skip-if "GC API is an error from Darwin16." { *-*-darwin1[6-9]* *-*-darwin2[0-9]* } { "-fnext-runtime" } { "" } } */ +/* { dg-skip-if "GC API is an error from Darwin16." { *-*-darwin1[6-9]* *-*-darwin2* } { "-fnext-runtime" } { "" } } */ /* { dg-options "-fobjc-gc" } */ /* { dg-prune-output "cc1obj: warning: '-fobjc-gc' is ignored for '-fgnu-runtime'" } */ >From ci_notify@linaro.org Wed Dec 22 07:33:47 2021 Return-Path: X-Original-To: gcc-regression@gcc.gnu.org Delivered-To: gcc-regression@gcc.gnu.org Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id ECB9D3858C3A for ; Wed, 22 Dec 2021 07:33:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ECB9D3858C3A Received: by mail-wr1-x42c.google.com with SMTP id j18so3033788wrd.2 for ; Tue, 21 Dec 2021 23:33:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d100.net; s 210112; h=x-gm-message-state:from:date:to:cc:message-id:subject:mime-version :list-id; bh=fNk0PXwsUAYsBOT31OZAFmo3F47T3/pInFpxeYwostE=; b=NIYzf79uoQo0oeN4n8mvM+doieevQq9Iraay6cFmqGp9XtnOqbnu0yMqpylNl8Glbj Gg4Y3PkR/yIZ5My60wMG7gQ74CjYpkNNZeIbU/680Mn0GoGVc36qQbBWJlPwH3H3QfQR h7rX8Ut5snHZHfjv+MCGHe7UYAiFrHRW96LQh37ycryo4bDWfgkAvDLMAEVPpqOb8zDh QpHr+zAna0MWBUyghn7FT/EsK64cvoD4Mt7ZBw5trStI7LqAwqLMu/yejy/oT9v2WnsO uqcegYE8TlExRUPfU2EBhtkkU3SBW5leq7qfLS3Cp4F+f+AFc6GokD4pSV2x/yCPcGCo KvEw=X-Gm-Message-State: AOAM531vkQBGT6EMfUOFdPSHStX6XhxPYL4W96izDpVDaxwV7ALrj4VY DUMm0mPPWWX1pjVuAy1Kk/ogprh4SXBGScno X-Google-Smtp-Source: ABdhPJy4Wttc1DcvxLnRcjoR700XfdIKmn/6kyF7WNbu8f4A98V2rYiXLK2C5JwvsMLKBhwawCDJJA=X-Received: by 2002:adf:da41:: with SMTP id r1mr1155771wrl.443.1640158424767; Tue, 21 Dec 2021 23:33:44 -0800 (PST) Received: from jenkins.jenkins (ci.linaro.org. [88.99.136.175]) by smtp.gmail.com with ESMTPSA id m17sm1143300wrw.11.2021.12.21.23.33.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits%6/256); Tue, 21 Dec 2021 23:33:44 -0800 (PST) From: ci_notify@linaro.org X-Google-Original-From: linaro-infrastructure-errors@lists.linaro.org Date: Wed, 22 Dec 2021 07:33:43 +0000 (UTC) To: Siddhesh Poyarekar Cc: gcc-regression@gcc.gnu.org Message-ID: <1420077047.6964.1640158424249@jenkins.jenkins> Subject: [TCWG CI] 464.h264ref:[.] dct_chroma slowed down by 37% after gcc: tree-optimization/103759: Use sizetype everywhere for object sizes MIME-Version: 1.0 X-Jenkins-Job: TCWG Bisect tcwg_bmk_tx1/gnu-master-aarch64-spec2k6-O2 X-Jenkins-Result: SUCCESS X-Spam-Status: No, score=-13.7 required=5.0 testsºYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-regression@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-regression mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2021 07:33:48 -0000 After gcc commit cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb Author: Siddhesh Poyarekar tree-optimization/103759: Use sizetype everywhere for object sizes the following hot functions slowed down by more than 10% (but their benchmarks slowed down by less than 2%): - 464.h264ref:[.] dct_chroma slowed down by 37% from 76 to 104 perf samples - 464.h264ref:[.] RDCost_for_macroblocks slowed down by 21% from 38 to 46 perf samples - 464.h264ref:[.] RDCost_for_4x4IntraBlocks slowed down by 18% from 142 to 168 perf samples - 433.milc:[.] su3mat_copy slowed down by 13% from 256 to 290 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_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/build-cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb/save-temps/ - Last_good save-temps: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/build-21423a1dfa079d4cd218f69d2fab9fe65a69fedb/save-temps/ - Baseline save-temps: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/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: aarch64-linux-gnu - Compiler flags: -O2 - Hardware: NVidia TX1 4x Cortex-A57 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_tx1/gnu-master-aarch64-spec2k6-O2 First_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/build-cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb/ Last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/build-21423a1dfa079d4cd218f69d2fab9fe65a69fedb/ Baseline build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/build-baseline/ Even more details: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/ Reproduce builds: mkdir investigate-gcc-cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb cd investigate-gcc-cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb # 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_tx1-gnu-master-aarch64-spec2k6-O2/34/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_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/manifests/build-parameters.sh --fail curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/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 cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb ../artifacts/test.sh # Reproduce last_good build git checkout --detach 21423a1dfa079d4cd218f69d2fab9fe65a69fedb ../artifacts/test.sh cd .. Full commit (up to 1000 lines): commit cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb Author: Siddhesh Poyarekar Date: Sat Dec 18 16:46:43 2021 +0530 tree-optimization/103759: Use sizetype everywhere for object sizes Since all computations in tree-object-size are now done in sizetype and not HOST_WIDE_INT, comparisons with HOST_WIDE_INT based unknown and initval would be incorrect. Instead, use the sizetype trees directly to generate and evaluate initval and unknown size values. gcc/ChangeLog: PR tree-optimization/103759 * tree-object-size.c (unknown, initval): Remove functions. (size_unknown, size_initval, size_unknown_p): Operate directly on trees. Signed-off-by: Siddhesh Poyarekar --- gcc/tree-object-size.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c index 71f6b747d05..ee9ea1bfbfd 100644 --- a/gcc/tree-object-size.c +++ b/gcc/tree-object-size.c @@ -83,30 +83,13 @@ static bitmap computed[OST_END]; /* Maximum value of offset we consider to be addition. */ static unsigned HOST_WIDE_INT offset_limit; -/* Initial value of object sizes; zero for maximum and SIZE_MAX for minimum - object size. */ - -static inline unsigned HOST_WIDE_INT -initval (int object_size_type) -{ - return (object_size_type & OST_MINIMUM) ? HOST_WIDE_INT_M1U : 0; -} - -/* Unknown object size value; it's the opposite of initval. */ - -static inline unsigned HOST_WIDE_INT -unknown (int object_size_type) -{ - return ~initval (object_size_type); -} - /* Return true if VAL is represents an unknown size for OBJECT_SIZE_TYPE. */ static inline bool size_unknown_p (tree val, int object_size_type) { - return (tree_fits_uhwi_p (val) - && tree_to_uhwi (val) == unknown (object_size_type)); + return ((object_size_type & OST_MINIMUM) + ? integer_zerop (val) : integer_all_onesp (val)); } /* Return a tree with initial value for OBJECT_SIZE_TYPE. */ @@ -114,7 +97,8 @@ size_unknown_p (tree val, int object_size_type) static inline tree size_initval (int object_size_type) { - return size_int (initval (object_size_type)); + return ((object_size_type & OST_MINIMUM) + ? TYPE_MAX_VALUE (sizetype) : size_zero_node); } /* Return a tree with unknown value for OBJECT_SIZE_TYPE. */ @@ -122,7 +106,8 @@ size_initval (int object_size_type) static inline tree size_unknown (int object_size_type) { - return size_int (unknown (object_size_type)); + return ((object_size_type & OST_MINIMUM) + ? size_zero_node : TYPE_MAX_VALUE (sizetype)); } /* Grow object_sizes[OBJECT_SIZE_TYPE] to num_ssa_names. */ >From prathamesh.kulkarni@linaro.org Wed Dec 22 09:22:59 2021 Return-Path: X-Original-To: gcc-regression@gcc.gnu.org Delivered-To: gcc-regression@gcc.gnu.org Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 201D43858400 for ; Wed, 22 Dec 2021 09:22:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 201D43858400 Received: by mail-ed1-x52b.google.com with SMTP id o20so6019719eds.10 for ; Wed, 22 Dec 2021 01:22:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d100.net; s 210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lNkuzYtz6mD090bJuTgDOEmh2CWoWFVqp7m9H9EP1Lo=; b=Xswv0yu2AxxZAADminh/dKL9PIUN9mUrU8EGD7yEM+6hTMAGZWL+EkvExAV+jLdJOj VSDjQQmf5kPU5GBoPxPz9t6+Dc+Di9jggdawGyepqLy20kuuWbh/p7LGUyUgM05ahc9W njZEsCxnl5B6OXDjRlNFFGK4NmNMTgpSSboEt7Cm6W9XqUDoAIF7cQSQdfwcLVw/E25K LSL2Ws4sxp9TqrWIonAK/iuuarIqb+WP7Ro1Dk/+STTh9WkWeknUkDCtpP/OfLFDfTZn cvzQ+8VAmEb0pW7OGMJmrUSZ+f+KSMvWovWckayadvlrggTwJKJrI+Cqo4uyzpoaZfgn OLyg=X-Gm-Message-State: AOAM532WbAwJ2mOmuILbElLqMJmZWNYPahOtpLkrm4IcDCpFHmVNO/WA sZ2Z18Ufz1A/a7M3GXdNCIykGea3SECXrJEZBXyGLA=X-Google-Smtp-Source: ABdhPJy2/j0uaQkjHJTZyWmy+UW8NPy/tu903KXxCnU/MGfIu6YGdzO5YusMNSyjr9trK7LHk0cZIIrT4mjgGoPpGREX-Received: by 2002:a17:907:9694:: with SMTP id hd20mr1711321ejc.360.1640164975561; Wed, 22 Dec 2021 01:22:55 -0800 (PST) MIME-Version: 1.0 References: <1420077047.6964.1640158424249@jenkins.jenkins> In-Reply-To: <1420077047.6964.1640158424249@jenkins.jenkins> From: Prathamesh Kulkarni Date: Wed, 22 Dec 2021 14:52:19 +0530 Message-ID: Subject: Re: [TCWG CI] 464.h264ref:[.] dct_chroma slowed down by 37% after gcc: tree-optimization/103759: Use sizetype everywhere for object sizes To: ci_notify@linaro.org Cc: Siddhesh Poyarekar , gcc-regression@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.8 required=5.0 testsºYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2021 09:22:59 -0000 On Wed, 22 Dec 2021 at 13:03, wrote: > > After gcc commit cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb > Author: Siddhesh Poyarekar > > tree-optimization/103759: Use sizetype everywhere for object sizes > > the following hot functions slowed down by more than 10% (but their benchmarks slowed down by less than 2%): > - 464.h264ref:[.] dct_chroma slowed down by 37% from 76 to 104 perf samples > - 464.h264ref:[.] RDCost_for_macroblocks slowed down by 21% from 38 to 46 perf samples > - 464.h264ref:[.] RDCost_for_4x4IntraBlocks slowed down by 18% from 142 to 168 perf samples > - 433.milc:[.] su3mat_copy slowed down by 13% from 256 to 290 perf samples > Hi Siddhesh, Unfortunately this is a false positive caused due to an issue in our CI, which we are looking into. I apologise for the inconvenience, please ignore the report. Best Regards, Prathamesh > 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_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/build-cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb/save-temps/ > - Last_good save-temps: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/build-21423a1dfa079d4cd218f69d2fab9fe65a69fedb/save-temps/ > - Baseline save-temps: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/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: aarch64-linux-gnu > - Compiler flags: -O2 > - Hardware: NVidia TX1 4x Cortex-A57 > > 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_tx1/gnu-master-aarch64-spec2k6-O2 > > First_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/build-cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb/ > Last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/build-21423a1dfa079d4cd218f69d2fab9fe65a69fedb/ > Baseline build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/build-baseline/ > Even more details: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/ > > Reproduce builds: > > mkdir investigate-gcc-cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb > cd investigate-gcc-cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb > > # 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_tx1-gnu-master-aarch64-spec2k6-O2/34/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_tx1-gnu-master-aarch64-spec2k6-O2/34/artifact/artifacts/manifests/build-parameters.sh --fail > curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aarch64-spec2k6-O2/34/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 cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb > ../artifacts/test.sh > > # Reproduce last_good build > git checkout --detach 21423a1dfa079d4cd218f69d2fab9fe65a69fedb > ../artifacts/test.sh > > cd .. > > > Full commit (up to 1000 lines): > > commit cc032ec1ecb34b006f42e170ccb9d76aa42fd8eb > Author: Siddhesh Poyarekar > Date: Sat Dec 18 16:46:43 2021 +0530 > > tree-optimization/103759: Use sizetype everywhere for object sizes > > Since all computations in tree-object-size are now done in sizetype and > not HOST_WIDE_INT, comparisons with HOST_WIDE_INT based unknown and > initval would be incorrect. Instead, use the sizetype trees directly to > generate and evaluate initval and unknown size values. > > gcc/ChangeLog: > > PR tree-optimization/103759 > * tree-object-size.c (unknown, initval): Remove functions. > (size_unknown, size_initval, size_unknown_p): Operate directly > on trees. > > Signed-off-by: Siddhesh Poyarekar > --- > gcc/tree-object-size.c | 27 ++++++--------------------- > 1 file changed, 6 insertions(+), 21 deletions(-) > > diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c > index 71f6b747d05..ee9ea1bfbfd 100644 > --- a/gcc/tree-object-size.c > +++ b/gcc/tree-object-size.c > @@ -83,30 +83,13 @@ static bitmap computed[OST_END]; > /* Maximum value of offset we consider to be addition. */ > static unsigned HOST_WIDE_INT offset_limit; > > -/* Initial value of object sizes; zero for maximum and SIZE_MAX for minimum > - object size. */ > - > -static inline unsigned HOST_WIDE_INT > -initval (int object_size_type) > -{ > - return (object_size_type & OST_MINIMUM) ? HOST_WIDE_INT_M1U : 0; > -} > - > -/* Unknown object size value; it's the opposite of initval. */ > - > -static inline unsigned HOST_WIDE_INT > -unknown (int object_size_type) > -{ > - return ~initval (object_size_type); > -} > - > /* Return true if VAL is represents an unknown size for OBJECT_SIZE_TYPE. */ > > static inline bool > size_unknown_p (tree val, int object_size_type) > { > - return (tree_fits_uhwi_p (val) > - && tree_to_uhwi (val) == unknown (object_size_type)); > + return ((object_size_type & OST_MINIMUM) > + ? integer_zerop (val) : integer_all_onesp (val)); > } > > /* Return a tree with initial value for OBJECT_SIZE_TYPE. */ > @@ -114,7 +97,8 @@ size_unknown_p (tree val, int object_size_type) > static inline tree > size_initval (int object_size_type) > { > - return size_int (initval (object_size_type)); > + return ((object_size_type & OST_MINIMUM) > + ? TYPE_MAX_VALUE (sizetype) : size_zero_node); > } > > /* Return a tree with unknown value for OBJECT_SIZE_TYPE. */ > @@ -122,7 +106,8 @@ size_initval (int object_size_type) > static inline tree > size_unknown (int object_size_type) > { > - return size_int (unknown (object_size_type)); > + return ((object_size_type & OST_MINIMUM) > + ? size_zero_node : TYPE_MAX_VALUE (sizetype)); > } > > /* Grow object_sizes[OBJECT_SIZE_TYPE] to num_ssa_names. */ >