From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20944 invoked by alias); 7 Apr 2006 12:01:21 -0000 Received: (qmail 20913 invoked by uid 48); 7 Apr 2006 12:01:16 -0000 Date: Fri, 07 Apr 2006 12:01:00 -0000 Message-ID: <20060407120116.20912.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/23855] loop header should also be pulled out of the inner loop too In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-04/txt/msg00618.txt.bz2 List-Id: ------- Comment #12 from rguenth at gcc dot gnu dot org 2006-04-07 12:01 ------- So what I now have is (ahh, a PROP_loops would be so nice...) pass_ch pass_split_crit_edges pass_pre [cfg_cleanup to re-merge critical edges] pass_hoist_guards which works nice for this scenario, still without an extra load-PRE pass we have memory loads that were only PREd out of the inner loop (due to the not hoisted guard) inside the outer loop, even if they're now redundant. Which makes me wonder, if PRE could do loop-header-FRE here? Danny? Has such been done before? Basically you have do { if (*mem > 0) { i = 0; do { } while (*mem > i); } } while (...); where the (*mem > 0) is (full or partially?) redundant. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dberlin at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23855