From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5957 invoked by alias); 17 Oct 2009 05:32:30 -0000 Received: (qmail 5943 invoked by uid 22791); 17 Oct 2009 05:32:29 -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.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Oct 2009 05:32:24 +0000 Received: from spaceape12.eur.corp.google.com (spaceape12.eur.corp.google.com [172.28.16.146]) by smtp-out.google.com with ESMTP id n9H5WMHr020617 for ; Sat, 17 Oct 2009 06:32:22 +0100 Received: from pzk28 (pzk28.prod.google.com [10.243.19.156]) by spaceape12.eur.corp.google.com with ESMTP id n9H5WIbn004222 for ; Fri, 16 Oct 2009 22:32:19 -0700 Received: by pzk28 with SMTP id 28so2146841pzk.27 for ; Fri, 16 Oct 2009 22:32:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.134.15 with SMTP id h15mr733858rvd.139.1255757538645; Fri, 16 Oct 2009 22:32:18 -0700 (PDT) In-Reply-To: References: <7587b290910160620l1266a752n651300451b392e64@mail.gmail.com> Date: Sat, 17 Oct 2009 06:01:00 -0000 Message-ID: <7587b290910162232se0c399eqe0a39b9832c70be4@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/msg01102.txt.bz2 On Sat, Oct 17, 2009 at 9:21 AM, Ian Lance Taylor wrote: > Carrot Wei writes: > >> Index: ifcvt.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- ifcvt.c =A0 =A0 (revision 152888) >> +++ ifcvt.c =A0 =A0 (working copy) >> @@ -21,13 +21,13 @@ >> =A0#include "config.h" >> =A0#include "system.h" >> =A0#include "coretypes.h" >> +#include "insn-config.h" >> =A0#include "tm.h" >> >> =A0#include "rtl.h" >> =A0#include "regs.h" >> =A0#include "function.h" >> =A0#include "flags.h" >> -#include "insn-config.h" >> =A0#include "recog.h" >> =A0#include "except.h" >> =A0#include "hard-reg-set.h" > > > No. =A0The order of the main #includes is fairly canonical across gcc > source files. =A0Requiring one file to do things differently is certain > to break over time. > > One thing you could do is have genconfig.c look for the predicate of > define_cond_exec, and use it as the value of > HAVE_conditional_execution. =A0I don't know how well that would work. 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. 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. > > 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. thanks Carrot