From: "Lehua Ding" <lehua.ding@rivai.ai>
To: "Kito Cheng" <kito.cheng@gmail.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
"juzhe.zhong" <juzhe.zhong@rivai.ai>,
"rdapp.gcc" <rdapp.gcc@gmail.com>, palmer <palmer@rivosinc.com>,
jeffreyalaw <jeffreyalaw@gmail.com>
Subject: Re: [PATCH 2/3] RISC-V: Part-2: Save/Restore vector registers which need to be preversed
Date: Mon, 7 Aug 2023 15:31:49 +0800 [thread overview]
Message-ID: <E4F5FFF57ED3EBD9+tencent_BD36E7A51DE687CC75F78C3C725BFDC2EE06@qq.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]
Hi Kito,
> > +machine_mode m1_mode = TARGET_VECTOR_ELEN_64
> > +? (TARGET_MIN_VLEN >= 128 ? VNx2DImode : VNx1DImode)
> > +: VNx1SImode;
> This should update since JuZhe has update the mode system :P
Yes, thanks reminder.
> > @@ -5907,7 +6057,7 @@ riscv_expand_epilogue (int style)
> > Start off by assuming that no registers need to be restored.*/
> >struct riscv_frame_info *frame = &cfun->machine->frame;
> >unsigned mask = frame->mask;
> > -HOST_WIDE_INT step2 = 0;
> > +poly_int64 step2 = 0;
> I saw we check `step2.to_constant ()
> 0` later, does it mean step2 is
> always a scalar rather than a poly number?
> If so, I would suggest keeping HOST_WIDE_INT if possible.
step2 will be reduced by `riscv_for_each_saved_v_reg (step2, riscv_restore_reg, false);`
before `step2.to_constant () > 0`. After `riscv_for_each_saved_v_reg`,
the step2 must be a constant. So step2 may be a poly number if there are any
length agnostic vector registers that need to be saved.
Best,
Lehua
next reply other threads:[~2023-08-07 7:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 7:31 Lehua Ding [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-20 9:01 [PATCH 0/3] RISC-V: Add an experimental vector calling convention Lehua Ding
2023-07-20 9:01 ` [PATCH 2/3] RISC-V: Part-2: Save/Restore vector registers which need to be preversed Lehua Ding
2023-08-07 6:53 ` Kito Cheng
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=E4F5FFF57ED3EBD9+tencent_BD36E7A51DE687CC75F78C3C725BFDC2EE06@qq.com \
--to=lehua.ding@rivai.ai \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=juzhe.zhong@rivai.ai \
--cc=kito.cheng@gmail.com \
--cc=palmer@rivosinc.com \
--cc=rdapp.gcc@gmail.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).