From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1656 invoked by alias); 17 Oct 2009 06:12:43 -0000 Received: (qmail 1638 invoked by uid 22791); 17 Oct 2009 06:12:42 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Oct 2009 06:12:38 +0000 Received: from wpaz17.hot.corp.google.com (wpaz17.hot.corp.google.com [172.24.198.81]) by smtp-out.google.com with ESMTP id n9H6CZlm006003 for ; Fri, 16 Oct 2009 23:12:36 -0700 Received: from pzk13 (pzk13.prod.google.com [10.243.19.141]) by wpaz17.hot.corp.google.com with ESMTP id n9H6CAiE030596 for ; Fri, 16 Oct 2009 23:12:33 -0700 Received: by pzk13 with SMTP id 13so2106533pzk.25 for ; Fri, 16 Oct 2009 23:12:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.134.15 with SMTP id h15mr783639rvd.139.1255759952518; Fri, 16 Oct 2009 23:12:32 -0700 (PDT) In-Reply-To: References: <7587b290910160620l1266a752n651300451b392e64@mail.gmail.com> <7587b290910162232se0c399eqe0a39b9832c70be4@mail.gmail.com> Date: Sat, 17 Oct 2009 06:18:00 -0000 Message-ID: <7587b290910162312s32de4253pdab5dea10f46502d@mail.gmail.com> Subject: Re: [PATCH: PR target/41705] Enable if conversion for thumb1 by new HAVE_conditional_execution definition From: Carrot Wei To: Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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 X-SW-Source: 2009-10/txt/msg01107.txt.bz2 On Sat, Oct 17, 2009 at 2:01 PM, Ian Lance Taylor wrote: > Carrot Wei writes: > >> Current method in genconfig.c is looking for COND_EXEC expression. I've >> grepped several targets, there are several cases have cond_exec but no >> define_cond_exec. So use define_cond_exec may change their behavior. > > I agree that those targets should not be changed. > > Would it be possible for genconfig to simply || together the various > predicates for the various cond_exec insns? > > >> Can we change the output of genconfig.c to >> >> #ifndef HAVE_conditional_execution >> #define HAVE_conditional_execution 1 >> #endif >> >> So we can use customized version of HAVE_conditional_execution defined >> in the target specific header file if we want. Otherwise genconfig.c will >> generate one according to the contents of md file. > > No, I don't think that is a good idea. =A0Nothing else in gcc works that > way, and I see nothing to recommend it. =A0Don't think "how can I solve > this problem today for me." =A0Think "how can I solve this for all time > for all targets in a way that is easy to maintain." > I learned this method from the definition of MAX_INSNS_PER_SPLIT. :) > >>> The quick solution would be to introduce a new target hook and change >>> every place that checks HAVE_conditional_execution to check that. >> >> I'm afraid simply replacing all HAVE_conditional_execution with new targ= et hook >> may break other targets have HAVE_conditional_execution enabled. > > Just make the default value for the target hook return > HAVE_conditional_execution. > This is just what I need. Thank you, Ian! Carrot