From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11339 invoked by alias); 17 Oct 2009 06:01:24 -0000 Received: (qmail 11139 invoked by uid 22791); 17 Oct 2009 06:01:22 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Oct 2009 06:01:18 +0000 Received: from spaceape11.eur.corp.google.com (spaceape11.eur.corp.google.com [172.28.16.145]) by smtp-out.google.com with ESMTP id n9H61F8q009386 for ; Sat, 17 Oct 2009 07:01:16 +0100 Received: from pxi1 (pxi1.prod.google.com [10.243.27.1]) by spaceape11.eur.corp.google.com with ESMTP id n9H61Cve022866 for ; Fri, 16 Oct 2009 23:01:13 -0700 Received: by pxi1 with SMTP id 1so730056pxi.33 for ; Fri, 16 Oct 2009 23:01:12 -0700 (PDT) Received: by 10.140.225.9 with SMTP id x9mr763552rvg.175.1255759272246; Fri, 16 Oct 2009 23:01:12 -0700 (PDT) Received: from coign.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) by mx.google.com with ESMTPS id 23sm940061pzk.4.2009.10.16.23.01.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Oct 2009 23:01:11 -0700 (PDT) To: Carrot Wei Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH: PR target/41705] Enable if conversion for thumb1 by new HAVE_conditional_execution definition References: <7587b290910160620l1266a752n651300451b392e64@mail.gmail.com> <7587b290910162232se0c399eqe0a39b9832c70be4@mail.gmail.com> From: Ian Lance Taylor Date: Sat, 17 Oct 2009 06:01:00 -0000 In-Reply-To: <7587b290910162232se0c399eqe0a39b9832c70be4@mail.gmail.com> (Carrot Wei's message of "Sat\, 17 Oct 2009 13\:32\:18 +0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes 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/msg01103.txt.bz2 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. Nothing else in gcc works that way, and I see nothing to recommend it. Don't think "how can I solve this problem today for me." Think "how can I solve this for all time for all targets in a way that is easy to maintain." >> 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 target hook > may break other targets have HAVE_conditional_execution enabled. Just make the default value for the target hook return HAVE_conditional_execution. Ian