public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Trevor Saunders <tbsaunde@tbsaunde.org>,
	 GCC Patches <gcc-patches@gcc.gnu.org>,
	 Mikhail Maltsev <maltsevm@gmail.com>
Subject: Re: Add .def file for public target instructions
Date: Wed, 01 Jul 2015 10:18:00 -0000	[thread overview]
Message-ID: <874mlonpui.fsf@e105548-lin.cambridge.arm.com> (raw)
In-Reply-To: <878ub0nq06.fsf@e105548-lin.cambridge.arm.com> (Richard	Sandiford's message of "Wed, 01 Jul 2015 11:14:49 +0100")

Richard Sandiford <richard.sandiford@arm.com> writes:
> Richard Biener <richard.guenther@gmail.com> writes:
>> On Wed, Jul 1, 2015 at 11:39 AM, Trevor Saunders
>> <tbsaunde@tbsaunde.org> wrote:
>>> On Tue, Jun 23, 2015 at 07:41:42PM +0100, Richard Sandiford wrote:
>>>> [A fair bit later than promised, sorry...]
>>>>
>>>> Mikhail posted a patch to make genflags generate the default HAVE_foo
>>>> and gen_foo definitions that have recently been added to defaults.h:
>>>>
>>>>   https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00723.html
>>>>
>>>> I agree it'd be a good idea to generate this kind of thing automatically,
>>>> but I think we should take the opportunity to move the interface to the
>>>> target structure.  I.e.:
>>>>
>>>>   HAVE_foo -> targetm.have_foo ()
>>>>   gen_foo -> targetm.gen_foo ()
>>>>
>>>> This should move us closer to the pipedream goal of supporting multiple
>>>> targets at once.  It should also mean that only the target code depends
>>>> on insn-flags.h.
>>>
>>> using targetm. certainly seems like an improvement.  I wonder if it
>>> would be faster to stick this data on a per function object.  I think
>>> that would mean you could compute what insns are available once when the
>>> function is created and afterwards all checks would only needed to be
>>> reading computed values.
>>
>> I think the memory cost of this is prohibitive.
>
> Yeah.  I did wonder about having optabs-like caching in some
> target_globals structure, but I don't think it's really worth it.
> In practice we only tend to call the have_*() functions when we're
> trying to generate something (unlike optabs), and so any saving would
> be dwarfed by the cost of generating whatever rtx we go on to create.

...plus (forgot the main reason): the condition for things like return
and simple_return are only available after register allocation.

Thanks,
Richard

      reply	other threads:[~2015-07-01 10:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 18:42 Richard Sandiford
2015-06-24  6:36 ` Jeff Law
2015-06-25 20:11 ` H.J. Lu
2015-06-25 23:00   ` H.J. Lu
2015-06-25 23:37     ` Andrew Pinski
2015-06-25 23:55       ` H.J. Lu
2015-06-26  6:33         ` H.J. Lu
2015-06-26  8:50           ` Richard Sandiford
2015-06-26  7:42 ` Markus Trippelsdorf
2015-06-26  8:45   ` Richard Sandiford
2015-06-26 10:15     ` Richard Sandiford
2015-07-01  9:39 ` Trevor Saunders
2015-07-01  9:53   ` Richard Biener
2015-07-01 10:14     ` Richard Sandiford
2015-07-01 10:18       ` Richard Sandiford [this message]

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=874mlonpui.fsf@e105548-lin.cambridge.arm.com \
    --to=richard.sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=maltsevm@gmail.com \
    --cc=richard.guenther@gmail.com \
    --cc=tbsaunde@tbsaunde.org \
    /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).