public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Juzhe-Zhong <juzhe.zhong@rivai.ai>, gcc-patches@gcc.gnu.org
Cc: kito.cheng@sifive.com, kito.cheng@gmail.com, rdapp.gcc@gmail.com
Subject: Re: [PATCH V2] RISC-V: Refactor RVV machine modes
Date: Wed, 19 Jul 2023 17:15:20 -0600	[thread overview]
Message-ID: <e25248a5-d64e-0c5f-5e99-32c41c18d6e5@gmail.com> (raw)
In-Reply-To: <20230719224502.67323-1-juzhe.zhong@rivai.ai>



On 7/19/23 16:45, Juzhe-Zhong wrote:
> Current machine modes layout is hard to maintain && read && understand.
> 
> For a LMUL = 1 SI vector mode:
>    1. VNx1SI mode when TARGET_MIN_VLEN = 32.
>    2. VNx2SI mode when TARGET_MIN_VLEN = 64.
>    3. VNx4SI mode when TARGET_MIN_VLEN = 128.
> 
> Such implementation produces redundant machine modes and thus redudant machine description patterns.
> 
> Now, this patch refactor machine modes into 3 follow formats:
>     
>    1. mask mode: RVVMF64BImode, RVVMF32BImode, ...., RVVM1BImode.
>                  RVVMF64BImode means such mask mode occupy 1/64 of a RVV M1 reg.
>                  RVVM1BImode size = LMUL = 1 reg.
>    2. non-tuple vector modes:
>                  RVV<LMUL><BASE_MODE>: E.g. RVVMF8QImode = SEW = 8 && LMUL = MF8
>    3. tuple vector modes:
>                  RVV<LMUL>x<NF><BASE_MODE>.
> 
> For example, for SEW = 16, LMUL = MF2 , int mode is always RVVMF4HImode, then adjust its size according to TARGET_MIN_VLEN.
> 
> Before this patch,  the machine description patterns: 17551
> After this patch, the machine description patterns: 14132 =====> reduce 3K+ patterns.
> 
> Regression of gcc/g++ rv32/rv64 all passed.
I haven't had a chance to look at this yet.  But does it change 
insn-emit.cc in any significant way?  Particularly the maybe_code_for_* 
functions which I think are playing a major role in the build time 
regressions we're seeing, particularly native builds in qemu.

jeff

  reply	other threads:[~2023-07-19 23:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19 22:45 Juzhe-Zhong
2023-07-19 23:15 ` Jeff Law [this message]
2023-07-19 23:16   ` 钟居哲

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=e25248a5-d64e-0c5f-5e99-32c41c18d6e5@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    --cc=kito.cheng@gmail.com \
    --cc=kito.cheng@sifive.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).