From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2AC883858D32; Sun, 4 Jun 2023 18:35:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2AC883858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685903733; bh=t19TJUUh5lvJaOyOcQxmLR3jcSh37Z8qKO32X1068Io=; h=From:To:Subject:Date:In-Reply-To:References:From; b=A2qwV6JaeoMRm8TZGeZRaJ1HYKgTIDwAYi4hfxCn+hmxJX+UNkWCu37xJTxUAKxCR CoCYpFXNmfVe8W3ftsBEFuWB89FJz67M/82vqqtNs1LFMGg6fz+0gya/JYa0TdOlZe +z+iKr58t7ODbfJWcOKF4iCjqGYFJtKT7OnSVd3Y= From: "klepikov.alex+bugs at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54089] [SH] Refactor shift patterns Date: Sun, 04 Jun 2023 18:35:30 +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: 4.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: klepikov.alex+bugs at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: olegendo 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=3D54089 --- Comment #58 from Alexander Klepikov --- > Another thing ... the reason why it's desirable to expand into the libcall > earlier is to allow hoisting the function call address outside of loops a= nd > things like that. Ouch. That's a real problem. Short loops can become slower on about 10%. Bu= t is it possible to detect a loop during expand pass? It looks like basic blocks have loop depth info, but I still don't now how to access a basic block. > That happens only once at the RTL level during > compilation and that's before the combine pass. Since there are no loops > around optimization passes in the compiler, it's always going to be a > compromise. But it might be OK to repeat a particular optimization pass > only for SH, if it helps anything. I would try that. I think loop optimiztion pass should be repeated after sp= lit pass. Do you know how to do it?=