public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: MAILER-DAEMON (Mail Delivery System)
To: gcc-patches@gcc.gnu.org
Subject: Undelivered Mail Returned to Sender
Date: Tue, 10 Aug 2021 13:04:23 +0200 (CEST)	[thread overview]
Message-ID: <20210810110423.8968A3237BB@fx409.security-mail.net> (raw)

[-- Attachment #1: Notification --]
[-- Type: text/plain, Size: 601 bytes --]

This is the mail system at host fx409.security-mail.net.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<marc.poulhies@kalray.eu>: host zimbra2.kalray.eu[195.135.97.26] said: 550
    5.1.1 <marc.poulhies@kalray.eu>: Recipient address rejected: User unknown
    in virtual mailbox table (in reply to RCPT TO command)

[-- Attachment #2: Delivery report --]
[-- Type: message/delivery-status, Size: 474 bytes --]

[-- Attachment #3: Undelivered Message --]
[-- Type: message/rfc822, Size: 8655 bytes --]

From: Richard Biener via Gcc-patches <gcc-patches@gcc.gnu.org>
To: Jojo R <rjiejie@linux.alibaba.com>, Richard Sandiford <richard.sandiford@arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Adding target hook allows to reject initialization of register
Date: Tue, 10 Aug 2021 13:03:09 +0200
Message-ID: <CAFiYyc2W5bL93-SsMXo3Yz_eYzHkyGVTR8GE24_p_n=zWVbW+g@mail.gmail.com>

On Tue, Aug 10, 2021 at 10:33 AM Jojo R via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Some target like RISC-V allow to group vector register as a whole,
> and only operate part of it in fact, but the 'init-regs' pass will add initialization
> for uninitialized registers. Add this hook to reject this action for reducing instruction.

Are these groups "visible"?  That is, are the pseudos multi-reg
pseudos?  I wonder
if there's a more generic way to tame down initregs w/o introducing a new target
hook.

Btw, initregs is a red herring - it ideally should go away.  See PR61810.

So instead of adding to it can you see whether disabling the pass for RISC-V
works w/o fallout (and add a comment to the PR)?  Maybe some more RTL
literate (in particular DF literate) can look at the remaining issue.
Richard, did you
ever have a look into the "issue" that initregs covers up (whatever
that exactly is)?

Thanks,
Richard.

>         gcc/
>         * init-regs.c (initialize_uninitialized_regs): Call register_reject_init_p.
>         * target.def (register_reject_init_p): New hook.
>         * doc/tm.texi.in: Add TARGET_REGISTER_REJECT_INIT_P.
>         * doc/tm.texi: Regenerated.
> ---
>  gcc/doc/tm.texi    | 6 ++++++
>  gcc/doc/tm.texi.in | 2 ++
>  gcc/init-regs.c    | 5 +++++
>  gcc/target.def     | 8 ++++++++
>  4 files changed, 21 insertions(+)
>
> diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
> index a30fdcbbf3d6..83fd5496ca3f 100644
> --- a/gcc/doc/tm.texi
> +++ b/gcc/doc/tm.texi
> @@ -12588,3 +12588,9 @@ Return an RTX representing @var{tagged_pointer} with its tag set to zero.
>  Store the result in @var{target} if convenient.
>  The default clears the top byte of the original pointer.
>  @end deftypefn
> +
> +@deftypefn {Target Hook} bool TARGET_REGISTER_REJECT_INIT_P (rtx @var{reg})
> +This target hook should return @code{true} if reject initialization for a uninitialized @var{reg}.
> +
> +The default value of this hook is @code{NULL}.
> +@end deftypefn
> diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
> index 611fc500ac86..13174ce66d59 100644
> --- a/gcc/doc/tm.texi.in
> +++ b/gcc/doc/tm.texi.in
> @@ -8180,3 +8180,5 @@ maintainer is familiar with.
>  @hook TARGET_MEMTAG_EXTRACT_TAG
>
>  @hook TARGET_MEMTAG_UNTAGGED_POINTER
> +
> +@hook TARGET_REGISTER_REJECT_INIT_P
> diff --git a/gcc/init-regs.c b/gcc/init-regs.c
> index 72e898f3e334..51c0d669d30b 100644
> --- a/gcc/init-regs.c
> +++ b/gcc/init-regs.c
> @@ -21,6 +21,7 @@ along with GCC; see the file COPYING3.  If not see
>  #include "system.h"
>  #include "coretypes.h"
>  #include "backend.h"
> +#include "target.h"
>  #include "rtl.h"
>  #include "tree.h"
>  #include "df.h"
> @@ -101,6 +102,10 @@ initialize_uninitialized_regs (void)
>                   rtx_insn *move_insn;
>                   rtx reg = DF_REF_REAL_REG (use);
>
> +                 if (targetm.register_reject_init_p
> +                     && targetm.register_reject_init_p (reg))
> +                   continue;
> +
>                   bitmap_set_bit (already_genned, regno);
>
>                   start_sequence ();
> diff --git a/gcc/target.def b/gcc/target.def
> index 7676d5e626e3..c2b54421618d 100644
> --- a/gcc/target.def
> +++ b/gcc/target.def
> @@ -4545,6 +4545,14 @@ by a subtarget.",
>   unsigned HOST_WIDE_INT, (void),
>   NULL)
>
> +/* Return true if reject initialization for a uninitialized register.  */
> +DEFHOOK
> +(register_reject_init_p,
> + "This target hook should return @code{true} if reject initialization for a uninitialized @var{reg}.\n\
> +\n\
> +The default value of this hook is @code{NULL}.",
> + bool, (rtx reg), NULL)
> +
>  /* Functions relating to calls - argument passing, returns, etc.  */
>  /* Members of struct call have no special macro prefix.  */
>  HOOK_VECTOR (TARGET_CALLS, calls)
> --
> 2.24.3 (Apple Git-128)
>


To declare a filtering error, please use the following link : https://www.security-mail.net/reporter.php?mid=1dac.61125d35.60598.0&r=marc.poulhies%40kalray.eu&s=gcc-patches-bounces%2Bmarc.poulhies%3Dkalray.eu%40gcc.gnu.org&o=Re%3A+%5BPATCH%5D+Adding+target+hook+allows+to+reject+initialization+of+register&verdict=C&c=531bdddedefc24be9cb5af751a905f00acebd76f

             reply	other threads:[~2021-08-10 11:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10 11:04 MAILER-DAEMON [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-08-10 15:03 MAILER-DAEMON
2021-08-10 14:48 MAILER-DAEMON
2021-08-10 14:26 MAILER-DAEMON
2021-08-10 14:18 MAILER-DAEMON
2021-08-10 14:15 MAILER-DAEMON
2021-08-10 13:51 MAILER-DAEMON
2021-08-10 13:41 MAILER-DAEMON
2021-08-10 13:22 MAILER-DAEMON
2021-08-10 13:04 MAILER-DAEMON
2021-08-10 12:34 MAILER-DAEMON
2021-08-10 12:18 MAILER-DAEMON
2021-08-10 12:14 MAILER-DAEMON
2021-08-10 12:02 MAILER-DAEMON
2021-08-10 11:55 MAILER-DAEMON
2021-08-10 11:52 MAILER-DAEMON
2021-08-10 11:42 MAILER-DAEMON
2021-08-10 10:26 MAILER-DAEMON
2021-08-10 10:09 MAILER-DAEMON
2021-08-10  9:35 MAILER-DAEMON
2021-08-10  9:12 MAILER-DAEMON
2021-08-10  9:08 MAILER-DAEMON
2021-08-10  8:45 MAILER-DAEMON
2021-08-10  8:40 MAILER-DAEMON

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=20210810110423.8968A3237BB@fx409.security-mail.net \
    --to=gcc-patches@gcc.gnu.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).