From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7328 invoked by alias); 5 May 2003 09:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 7275 invoked by uid 71); 5 May 2003 09:36:00 -0000 Resent-Date: 5 May 2003 09:36:00 -0000 Resent-Message-ID: <20030505093600.7274.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, thome@lix.polytechnique.fr Received: (qmail 2831 invoked by uid 48); 5 May 2003 09:27:56 -0000 Message-Id: <20030505092756.2830.qmail@sources.redhat.com> Date: Mon, 05 May 2003 09:36:00 -0000 From: thome@lix.polytechnique.fr Reply-To: thome@lix.polytechnique.fr To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: optimization/10624: unroll-loops can't unroll nested constant loops X-SW-Source: 2003-05/txt/msg00265.txt.bz2 List-Id: >Number: 10624 >Category: optimization >Synopsis: unroll-loops can't unroll nested constant loops >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: change-request >Submitter-Id: net >Arrival-Date: Mon May 05 09:36:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: thome@lix.polytechnique.fr >Release: gcc-3.2.1 >Organization: >Environment: Red Hat Linux 8.0 >Description: #include /* * GCC is apparently unable to understand that this loop can be unrolled. * * That's a pity, as we would really want to avoid jumps (of course, * replace printf by some more critical code. I've got an example of such * code where ``manual'' unrolling wins 25%, and I guess that much larger * gaps can be obtained easily...) * * It is not a matter of MAX_UNROLLED_INSNS hitting the bound. The inner * loop is constant when the outer is expanded, but I guess unroll-loops * makes 1 pass only. * * Would it be prohibitive to handle such cases that might require * several passes for proper unrolling ? * * gcc -O3 -funroll-loops -S unroll_me.c */ void unroll_me() { const int n = 3; int i, j; for(i=0;iHow-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: