From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68359 invoked by alias); 20 Mar 2015 12:14:19 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 68343 invoked by uid 89); 20 Mar 2015 12:14:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-la0-f44.google.com Received: from mail-la0-f44.google.com (HELO mail-la0-f44.google.com) (209.85.215.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 20 Mar 2015 12:14:18 +0000 Received: by ladw1 with SMTP id w1so85401675lad.0 for ; Fri, 20 Mar 2015 05:14:14 -0700 (PDT) X-Received: by 10.112.25.38 with SMTP id z6mr22351110lbf.106.1426853654594; Fri, 20 Mar 2015 05:14:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.83.130 with HTTP; Fri, 20 Mar 2015 05:13:34 -0700 (PDT) In-Reply-To: <000101d062f8$68a35350$39e9f9f0$@arm.com> References: <000501d049d3$079385a0$16ba90e0$@arm.com> <000601d04a5c$a0c0f030$e242d090$@arm.com> <000001d062e8$ece63930$c6b2ab90$@arm.com> <000101d062f8$68a35350$39e9f9f0$@arm.com> From: Steven Bosscher Date: Fri, 20 Mar 2015 12:14:00 -0000 Message-ID: Subject: Re: [PATCH, GCC, stage1] Fallback to copy-prop if constant-prop not possible To: "Thomas Preud'homme" Cc: GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg01066.txt.bz2 On Fri, Mar 20, 2015 at 11:27 AM, Thomas Preud'homme wrote: > Sorry, I missed the parenthesis. REG_P needs indeed to be kept. I'd be > tempted to use !HARD_REGISTER_P instead since REG_P is already > checked but I don't mind either way. I put the cprop_reg_p check there instead of !HARD_REGISTER_P because I like to be able to quickly find all places where a similar check is performed. The check is whether the reg is something that copy propagation can handle, and that is what I added cprop_reg_p for. (Note that cprop can _currently_ handle only pseudos but there is no reason why a limited set of hard regs can't be handled also, e.g. the flag registers like in targetm.fixed_condition_code_regs). In this case, the result is that REG_P is checked twice. But then again, cprop_reg_p will be inlined and the double check optimized away. Anyway, I guess we've bikeshedded long enough over this patch as it is :-) Let's post a final form and declare it OK for stage1. As for PSEUDO_REG_P: If it were up to me, I'd like to have in rtl.h: static bool hard_register_p (rtx x) { return (REG_P (x) && HARD_REGISTER_NUM_P (REGNO (x))); } static bool pseudo_register_p (rtx x) { return (REG_P (x) && !HARD_REGISTER_NUM_P (REGNO (x))); } and do away with all the FIRST_PSEUDO_REGISTER tests. But I've proposed this in the past and there was opposition. Perhaps when we introduce a rtx_reg class... Ciao! Steven