From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24226 invoked by alias); 17 Mar 2010 18:31:05 -0000 Received: (qmail 24208 invoked by uid 22791); 17 Mar 2010 18:31:04 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from mx20.gnu.org (HELO mx20.gnu.org) (199.232.41.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Mar 2010 18:30:59 +0000 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nry1A-0000Fr-NR for gcc@gcc.gnu.org; Wed, 17 Mar 2010 14:30:57 -0400 Received: (qmail 27598 invoked from network); 17 Mar 2010 18:30:52 -0000 Received: from unknown (HELO ?128.107.165.182?) (wilson@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 Mar 2010 18:30:52 -0000 Subject: Re: constant hoisting out of loops From: Jim Wilson To: fanqifei@gmail.com Cc: gcc@gcc.gnu.org In-Reply-To: References: <4B9D53F9.4060609@codesourcery.com> Content-Type: text/plain Date: Wed, 17 Mar 2010 19:16:00 -0000 Message-Id: <1268850652.2587.9.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg00233.txt.bz2 On Wed, 2010-03-17 at 11:27 +0800, fanqifei wrote: > You are correct. The reload pass emitted the clr.w insn. > However, I can see loop opt passes after reload: > problem1.c.174r.loop2_invariant1 Not unless you have a modified toolchain. We don't run loop opt after register allocation. See the list of optimization passes in the FSF GCC passes.c file. loop2 occurs before ira/postreload. If you do have a modified toolchain, then I doubt that the current loop passes would work right, since they were designed to handle pseudo-regs not hard-regs. Jim