public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Anatoly Sokolov <aesok@post.ru>
Cc: gcc-patches@gcc.gnu.org, rth@redhat.com, chertykov@gmail.com
Subject: Re: Add more restriction in 'peep2_find_free_register'
Date: Wed, 18 Jun 2008 14:47:00 -0000	[thread overview]
Message-ID: <m3r6au245m.fsf@google.com> (raw)
In-Reply-To: <113229086.20080618021412@post.ru> (Anatoly Sokolov's message of "Wed\, 18 Jun 2008 02\:14\:12 +0400")

Anatoly Sokolov <aesok@post.ru> writes:

> This patch add two more check in 'peep2_find_free_register' function, which
> find free hard registers for use as scratch registers in peephole2.
>
>   * It is not allowed to use register that are being declared as global, as
>   scratch register.
>
>   * For an interrupt function it is safety to use only call-used registers
>   which are saved in prologue. In 'rename_registers' optimization pass this
>   check is done in HARD_REGNO_RENAME_OK macro. This patch add
>   HARD_REGNO_SCRATCH_OK macro for 'peephole2' pass. The
>   HARD_REGNO_SCRATCH_OK macro sould be difined for target which use interrupt
>   and 'match_scratch' in peephole2 (avr, m68k).

Please make a new target hook instead (I know that the existing
HARD_REGNO_RENAME_OK is still a macro).  Thanks.

Ian

  reply	other threads:[~2008-06-18 14:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17 22:26 Anatoly Sokolov
2008-06-18 14:47 ` Ian Lance Taylor [this message]
2008-06-19 15:36   ` Anatoly Sokolov
2008-06-30 21:02     ` Ian Lance Taylor
2008-06-18 22:10 Anatoly Sokolov

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=m3r6au245m.fsf@google.com \
    --to=iant@google.com \
    --cc=aesok@post.ru \
    --cc=chertykov@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rth@redhat.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).