From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43948 invoked by alias); 13 Aug 2015 02:11:48 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 43876 invoked by uid 48); 13 Aug 2015 02:11:44 -0000 From: "amker at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/29256] [4.9/5/6 regression] loop performance regression Date: Thu, 13 Aug 2015 02:11:00 -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.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: amker at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg00841.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29256 --- Comment #60 from amker at gcc dot gnu.org --- (In reply to Bill Schmidt from comment #59) > (In reply to rguenther@suse.de from comment #57) > > > > It's been a long time since I've done SPEC measuring with/without > > -funroll-loops (or/and -fpeel-loops). Note that these flags have > > secondary effects as well: > > > > toplev.c: flag_web = flag_unroll_loops || flag_peel_loops; > > toplev.c: flag_rename_registers = flag_unroll_loops || flag_peel_loops; > > We don't have a lot of data yet, but we have seen several examples in SPEC > and other benchmarks where turning on -funroll-loops is helpful, but should > be much more helpful -- in many cases performance improves with a much > higher unroll factor. However, the effectiveness of unrolling is very much > tied up with these issues in IVOPTS, where we currently end up with too many > separate base registers for IVs. As we increase the unroll factor, we By this, do you mean too many candidates are chosen? Or the issue just like this PR describes? Thanks. > eventually hit this as a limiting factor, so fixing this IVOPTS issue would > be very helpful for POWER. > > As a side note, with -fprofile-use a GIMPLE unroller could peel and unroll > hot loop traces in loops that would otherwise be too complex to unroll. > I.e., if there is a single hot trace through a loop, you can do tail > duplication on the trace to force it into superblock form, and then peel and > unroll that superblock while falling into the original loop if the trace is > left. Complete unrolling and unrolling by a factor are both possible. I > don't know of specific benchmarks that would be helped by this, though. > > (An RTL unroller could do this as well, but it seems much more natural and > implementable in GIMPLE.)