From: Robin Dapp <rdapp.gcc@gmail.com>
To: Juzhe-Zhong <juzhe.zhong@rivai.ai>, gcc-patches@gcc.gnu.org
Cc: rdapp.gcc@gmail.com, kito.cheng@gmail.com, kito.cheng@sifive.com,
jeffreyalaw@gmail.com
Subject: Re: [PATCH] RISC-V: Fix large memory usage of VSETVL PASS [PR113495]
Date: Tue, 23 Jan 2024 22:12:40 +0100 [thread overview]
Message-ID: <c9e8088e-3a6a-40c6-b3d5-7e2a32eb002e@gmail.com> (raw)
In-Reply-To: <20240123101249.2706615-1-juzhe.zhong@rivai.ai>
> SPEC 2017 wrf benchmark expose unreasonble memory usage of VSETVL PASS
> that is, VSETVL PASS consume over 33 GB memory which make use impossible
> to compile SPEC 2017 wrf in a laptop.
>
> The root cause is wasting-memory variables:
LGTM. The new code matches compute_lcm_local_properties more
closely which makes sense to me.
One separate thing, nothing to do with this patch - I find
bitmap_union_of_preds_with_entry not wrong but weirdly written.
Probably because it was copied from somewhere and slightly
adjusted? If you touch more code anyway, would you mind fixing it?
for (ix = 0; ix < EDGE_COUNT (b->preds); ix++)
{
e = EDGE_PRED (b, ix);
bitmap_copy (dst, src[e->src->index]);
break;
}
if (ix == EDGE_COUNT (b->preds))
bitmap_clear (dst);
The whole idea seems to _not_ skip the entry block. So something
like if (EDGE_COUNT () == 0) {...} else { bitmap_copy (...)) should
be sufficient? If the input is assumed to be empty we could even
skip the copy.
> -/* { dg-options "--param=riscv-autovec-preference=scalable -march=rv32gcv -mabi=ilp32 -fno-schedule-insns -fno-schedule-insns2 -fno-tree-vectorize" } */
> +/* { dg-options "--param=riscv-autovec-preference=scalable -march=rv32gcv -mabi=ilp32 -fno-tree-vectorize" } */
Why that change? Was no-schedule necessary before and is not anymore?
Is it a result from the changes? I'd hope not.
Regards
Robin
next prev parent reply other threads:[~2024-01-23 21:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 10:12 Juzhe-Zhong
2024-01-23 21:12 ` Robin Dapp [this message]
2024-01-23 22:55 ` 钟居哲
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=c9e8088e-3a6a-40c6-b3d5-7e2a32eb002e@gmail.com \
--to=rdapp.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=juzhe.zhong@rivai.ai \
--cc=kito.cheng@gmail.com \
--cc=kito.cheng@sifive.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).