From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1BF20385840F; Fri, 3 Mar 2023 07:31:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BF20385840F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677828712; bh=6+raEt1FY41rkwOw0d2PAoWkDiGnFsoebZORb65uqM8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Q2NbSIV66hnmBd32E7Ec1e1DL/Sr/ec0J/leALfY6SM32L35HVrhEYPEG6LQMS7WU Jl/bXH8gl48Vcml9pyIL4e3pkkpOCcbBJrx4vWsou0rF0aVDE2lu9K7Ob4Ksw4fX/y Oca9VnH7PyVlL0cSn0b3waNOG7yDQh+wRR0qsFjA= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108738] compile-time and memory-hog in mdreorg Date: Fri, 03 Mar 2023 07:31:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108738 --- Comment #8 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:6010189923908501ca5b02bd1f4aee05d2283118 commit r13-6439-g6010189923908501ca5b02bd1f4aee05d2283118 Author: Richard Biener Date: Thu Mar 2 13:43:51 2023 +0100 target/108738 - limit STV chain discovery The following puts a hard limit on the inherently quadratic STV chain discovery. Without a limit for the compiler.i testcase in PR26854 we see at -O2 machine dep reorg : 574.45 ( 53%) with release checking while with the proposed limit it's machine dep reorg : 2.86 ( 1%) PR target/108738 * config/i386/i386.opt (--param x86-stv-max-visits): New param. * doc/invoke.texi (--param x86-stv-max-visits): Document it. * config/i386/i386-features.h (scalar_chain::max_visits): New. (scalar_chain::build): Add bitmap parameter, return boolean. (scalar_chain::add_insn): Likewise. (scalar_chain::analyze_register_chain): Likewise. * config/i386/i386-features.cc (scalar_chain::scalar_chain): Initialize max_visits. (scalar_chain::analyze_register_chain): When we exhaust max_visits, abort. Also abort when running into any disallowed insn. (scalar_chain::add_insn): Propagate abort. (scalar_chain::build): Likewise. When aborting amend the set of disallowed insn with the insns set. (convert_scalars_to_vector): Adjust. Do not convert aborted chains.=