public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Carrot Wei <carrot@google.com>
To: Ian Lance Taylor <iant@google.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH: PR target/41705] Enable if conversion for thumb1 by new  	HAVE_conditional_execution definition
Date: Sat, 17 Oct 2009 06:18:00 -0000	[thread overview]
Message-ID: <7587b290910162312s32de4253pdab5dea10f46502d@mail.gmail.com> (raw)
In-Reply-To: <mcroco65zks.fsf@dhcp-172-17-9-151.mtv.corp.google.com>

On Sat, Oct 17, 2009 at 2:01 PM, Ian Lance Taylor <iant@google.com> wrote:
> Carrot Wei <carrot@google.com> 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."
>
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 target 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

  reply	other threads:[~2009-10-17  6:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-16 13:28 Carrot Wei
2009-10-17  1:40 ` Ian Lance Taylor
2009-10-17  6:01   ` Carrot Wei
2009-10-17  6:01     ` Ian Lance Taylor
2009-10-17  6:18       ` Carrot Wei [this message]
2009-10-19 14:35       ` Carrot Wei
2009-10-22  5:29         ` Ian Lance Taylor
2009-10-23 17:11           ` Richard Earnshaw
2009-10-25 14:22             ` Carrot Wei
2009-10-25 15:55               ` Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7587b290910162312s32de4253pdab5dea10f46502d@mail.gmail.com \
    --to=carrot@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iant@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).