public inbox for gcc-regression@sourceware.org
help / color / mirror / Atom feed
From: ci_notify@linaro.org
To: Aldy Hernandez <aldyh@redhat.com>
Cc: gcc-regression@gcc.gnu.org
Subject: [TCWG CI] 459.GemsFDTD grew in size by 2% after gcc: Cleanup --params for backward threader.
Date: Mon, 25 Oct 2021 12:54:33 +0000 (UTC)	[thread overview]
Message-ID: <1253914762.2089.1635166474385@jenkins.jenkins> (raw)

After gcc commit 0bd68793921ecf3bb5654252dea3763fd127ab77
Author: Aldy Hernandez <aldyh@redhat.com>

    Cleanup --params for backward threader.

the following benchmarks grew in size by more than 1%:
- 459.GemsFDTD grew in size by 2% from 253164 to 258432 bytes

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_apm-gnu-master-aarch64-spec2k6-Os/6/artifact/artifacts/build-0bd68793921ecf3bb5654252dea3763fd127ab77/save-temps/
- Last_good save-temps: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_apm-gnu-master-aarch64-spec2k6-Os/6/artifact/artifacts/build-d71e1be7c3a3e2058d1243e6a090e421c9fd7f85/save-temps/
- Baseline save-temps: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_apm-gnu-master-aarch64-spec2k6-Os/6/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: -Os
- Hardware: APM Mustang 8x X-Gene1

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_apm/gnu-master-aarch64-spec2k6-Os

First_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_apm-gnu-master-aarch64-spec2k6-Os/6/artifact/artifacts/build-0bd68793921ecf3bb5654252dea3763fd127ab77/
Last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_apm-gnu-master-aarch64-spec2k6-Os/6/artifact/artifacts/build-d71e1be7c3a3e2058d1243e6a090e421c9fd7f85/
Baseline build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_apm-gnu-master-aarch64-spec2k6-Os/6/artifact/artifacts/build-baseline/
Even more details: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_apm-gnu-master-aarch64-spec2k6-Os/6/artifact/artifacts/

Reproduce builds:
<cut>
mkdir investigate-gcc-0bd68793921ecf3bb5654252dea3763fd127ab77
cd investigate-gcc-0bd68793921ecf3bb5654252dea3763fd127ab77

# 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_apm-gnu-master-aarch64-spec2k6-Os/6/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_apm-gnu-master-aarch64-spec2k6-Os/6/artifact/artifacts/manifests/build-parameters.sh --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_apm-gnu-master-aarch64-spec2k6-Os/6/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 0bd68793921ecf3bb5654252dea3763fd127ab77
../artifacts/test.sh

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

cd ..
</cut>

Full commit (up to 1000 lines):
<cut>
commit 0bd68793921ecf3bb5654252dea3763fd127ab77
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Thu Oct 14 16:15:04 2021 +0200

    Cleanup --params for backward threader.
    
    The new backward threader makes some of the --param knobs used to
    control it questionable at best or no longer applicable at worst.
    
    The fsm-maximum-phi-arguments param is unused and can be removed.
    
    The max-fsm-thread-length param is block based which is a bit redundant,
    since we already restrict paths based on instruction estimates.
    
    The max-fsm-thread-paths restricts the total number of threadable paths
    in a function.  We probably don't need this.  Besides, the forward
    threader has no such restriction.
    
    Tested on x86-64 Linux.
    
    gcc/ChangeLog:
    
            * doc/invoke.texi: Remove max-fsm-thread-length,
            max-fsm-thread-paths, and fsm-maximum-phi-arguments.
            * params.opt: Same.
            * tree-ssa-threadbackward.c (back_threader::back_threader): Remove
            argument.
            (back_threader_registry::back_threader_registry): Same.
            (back_threader_profitability::profitable_path_p): Remove
            param_max_fsm_thread-length.
            (back_threader_registry::register_path): Remove
            m_max_allowable_paths.
---
 gcc/doc/invoke.texi           | 12 ------------
 gcc/params.opt                | 12 ------------
 gcc/tree-ssa-threadbackward.c | 27 +++------------------------
 3 files changed, 3 insertions(+), 48 deletions(-)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 64347b1ceba..0cc8a8edd05 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -14468,14 +14468,6 @@ Emit instrumentation calls to __tsan_func_entry() and __tsan_func_exit().
 Maximum number of instructions to copy when duplicating blocks on a
 finite state automaton jump thread path.
 
-@item max-fsm-thread-length
-Maximum number of basic blocks on a finite state automaton jump thread
-path.
-
-@item max-fsm-thread-paths
-Maximum number of new jump thread paths to create for a finite state
-automaton.
-
 @item parloops-chunk-size
 Chunk size of omp schedule for loops parallelized by parloops.
 
@@ -14630,10 +14622,6 @@ The maximum depth of recursive inlining for non-inline functions.
 Scale factor to apply to the number of statements in a threading path
 when comparing to the number of (scaled) blocks.
 
-@item fsm-maximum-phi-arguments
-Maximum number of arguments a PHI may have before the FSM threader
-will not try to thread through its block.
-
 @item uninit-control-dep-attempts
 Maximum number of nested calls to search for control dependencies
 during uninitialized variable analysis.
diff --git a/gcc/params.opt b/gcc/params.opt
index 84d642d72c5..06a6fdc9deb 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -173,10 +173,6 @@ Common Joined UInteger Var(param_ranger_logical_depth) Init(6) IntegerRange(1, 9
 Maximum depth of logical expression evaluation ranger will look through when
 evaluating outgoing edge ranges.
 
--param=fsm-maximum-phi-arguments=
-Common Joined UInteger Var(param_fsm_maximum_phi_arguments) Init(100) IntegerRange(1, 999999) Param Optimization
-Maximum number of arguments a PHI may have before the FSM threader will not try to thread through its block.
-
 -param=fsm-scale-path-blocks=
 Common Joined UInteger Var(param_fsm_scale_path_blocks) Init(3) IntegerRange(1, 10) Param Optimization
 Scale factor to apply to the number of blocks in a threading path when comparing to the number of (scaled) statements.
@@ -537,18 +533,10 @@ The maximum number of nested indirect inlining performed by early inliner.
 Common Joined UInteger Var(param_max_fields_for_field_sensitive) Param
 Maximum number of fields in a structure before pointer analysis treats the structure as a single variable.
 
--param=max-fsm-thread-length=
-Common Joined UInteger Var(param_max_fsm_thread_length) Init(10) IntegerRange(1, 999999) Param Optimization
-Maximum number of basic blocks on a finite state automaton jump thread path.
-
 -param=max-fsm-thread-path-insns=
 Common Joined UInteger Var(param_max_fsm_thread_path_insns) Init(100) IntegerRange(1, 999999) Param Optimization
 Maximum number of instructions to copy when duplicating blocks on a finite state automaton jump thread path.
 
--param=max-fsm-thread-paths=
-Common Joined UInteger Var(param_max_fsm_thread_paths) Init(50) IntegerRange(1, 999999) Param Optimization
-Maximum number of new jump thread paths to create for a finite state automaton.
-
 -param=max-gcse-insertion-ratio=
 Common Joined UInteger Var(param_max_gcse_insertion_ratio) Init(20) Param Optimization
 The maximum ratio of insertions to deletions of expressions in GCSE.
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c
index 1999ccf4834..7c2c1112bee 100644
--- a/gcc/tree-ssa-threadbackward.c
+++ b/gcc/tree-ssa-threadbackward.c
@@ -52,12 +52,11 @@ along with GCC; see the file COPYING3.  If not see
 class back_threader_registry
 {
 public:
-  back_threader_registry (int max_allowable_paths);
+  back_threader_registry ();
   bool register_path (const vec<basic_block> &, edge taken);
   bool thread_through_all_blocks (bool may_peel_loop_headers);
 private:
   back_jt_path_registry m_lowlevel_registry;
-  const int m_max_allowable_paths;
   int m_threaded_paths;
 };
 
@@ -120,8 +119,7 @@ private:
 const edge back_threader::UNREACHABLE_EDGE = (edge) -1;
 
 back_threader::back_threader (bool speed_p)
-  : m_registry (param_max_fsm_thread_paths),
-    m_profit (speed_p),
+  : m_profit (speed_p),
     m_solver (m_ranger, /*resolve=*/false)
 {
   m_last_stmt = NULL;
@@ -547,8 +545,7 @@ back_threader::debug ()
   dump (stderr);
 }
 
-back_threader_registry::back_threader_registry (int max_allowable_paths)
-  : m_max_allowable_paths (max_allowable_paths)
+back_threader_registry::back_threader_registry ()
 {
   m_threaded_paths = 0;
 }
@@ -594,15 +591,6 @@ back_threader_profitability::profitable_path_p (const vec<basic_block> &m_path,
   if (m_path.length () <= 1)
       return false;
 
-  if (m_path.length () > (unsigned) param_max_fsm_thread_length)
-    {
-      if (dump_file && (dump_flags & TDF_DETAILS))
-	fprintf (dump_file, "  FAIL: Jump-thread path not considered: "
-		 "the number of basic blocks on the path "
-		 "exceeds PARAM_MAX_FSM_THREAD_LENGTH.\n");
-      return false;
-    }
-
   int n_insns = 0;
   gimple_stmt_iterator gsi;
   loop_p loop = m_path[0]->loop_father;
@@ -885,15 +873,6 @@ bool
 back_threader_registry::register_path (const vec<basic_block> &m_path,
 				       edge taken_edge)
 {
-  if (m_threaded_paths > m_max_allowable_paths)
-    {
-      if (dump_file && (dump_flags & TDF_DETAILS))
-	fprintf (dump_file, "  FAIL: Jump-thread path not considered: "
-		 "the number of previously recorded paths to "
-		 "thread exceeds PARAM_MAX_FSM_THREAD_PATHS.\n");
-      return false;
-    }
-
   vec<jump_thread_edge *> *jump_thread_path
     = m_lowlevel_registry.allocate_thread_path ();
 
</cut>
>From hjl@sc.intel.com  Mon Oct 25 18:01:01 2021
Return-Path: <hjl@sc.intel.com>
X-Original-To: gcc-regression@gcc.gnu.org
Delivered-To: gcc-regression@gcc.gnu.org
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by sourceware.org (Postfix) with ESMTPS id 02DC6385842A
 for <gcc-regression@gcc.gnu.org>; Mon, 25 Oct 2021 18:00:59 +0000 (GMT)
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 02DC6385842A
X-IronPort-AV: E=McAfee;i="6200,9189,10148"; a="315920753"
X-IronPort-AV: E=Sophos;i="5.87,181,1631602800"; d="scan'208";a="315920753"
Received: from orsmga006.jf.intel.com ([10.7.209.51])
 by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 25 Oct 2021 11:00:58 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.87,181,1631602800"; d="scan'208";a="446339578"
Received: from scymds02.sc.intel.com ([10.82.73.244])
 by orsmga006.jf.intel.com with ESMTP; 25 Oct 2021 11:00:58 -0700
Received: from gnu-34.sc.intel.com (gnu-34.sc.intel.com [172.25.70.212])
 by scymds02.sc.intel.com with ESMTP id 19PI0wEi019387;
 Mon, 25 Oct 2021 11:00:58 -0700
Received: by gnu-34.sc.intel.com (Postfix, from userid 1000)
 id 525CD61D5F; Mon, 25 Oct 2021 11:00:58 -0700 (PDT)
Date: Mon, 25 Oct 2021 11:00:58 -0700
To: skpgkp2@gmail.com, hjl.tools@gmail.com, gcc-regression@gcc.gnu.org
Subject: Regressions on master at commit r12-4662 vs commit r12-4642 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: <20211025180058.525CD61D5F@gnu-34.sc.intel.com>
From: "H.J. Lu" <hjl@sc.intel.com>
X-Spam-Status: No, score=-3469.4 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: Mon, 25 Oct 2021 18:01:01 -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:


                 reply	other threads:[~2021-10-25 12:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1253914762.2089.1635166474385@jenkins.jenkins \
    --to=ci_notify@linaro.org \
    --cc=aldyh@redhat.com \
    --cc=gcc-regression@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).