From: Jeff Law <jeffreyalaw@gmail.com>
To: juzhe.zhong@rivai.ai, gcc-patches@gcc.gnu.org
Cc: kito.cheng@gmail.com, palmer@dabbelt.com
Subject: Re: [PATCH] RISC-V: Fix ICE of visiting non-existing block in CFG.
Date: Tue, 27 Dec 2022 14:47:07 -0700 [thread overview]
Message-ID: <bbfef4c1-4d68-4855-a02f-8a3ebd16d060@gmail.com> (raw)
In-Reply-To: <20221224030800.221397-1-juzhe.zhong@rivai.ai>
On 12/23/22 20:08, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>
> This patch is to fix issue of visiting non-existing block of CFG.
> Since blocks index of CFG in GCC are not always contiguous, we will potentially
> visit a gap block which is no existing in the current CFG.
>
> This patch can avoid visiting non existing block in CFG.
>
> I noticed such issue in my internal regression of current testsuite
> when I change the X86 server machine. This patch fix it:
> 17:27:15 job(build_and_test_rv32): Increased FAIL List:
> 17:27:15 job(build_and_test_rv32): FAIL: gcc.target/riscv/rvv/vsetvl/vlmax_back_prop-46.c
> -O2 -flto -fno-use-linker-plugin -flto-partition=none (internal compiler error: Segmentation fault)
>
> gcc/ChangeLog:
>
> * config/riscv/riscv-vsetvl.cc (pass_vsetvl::compute_global_backward_infos): Change to visit CFG.
> (pass_vsetvl::prune_expressions): Ditto.
The usual way to iterate over the blocks is something like this
basic_block bb
FOR_EACH_BB (bb, cfun)
{
do whatever you need on BB
}
Please use that form as that's what most folks working with GCC are
already using.
Jeff
next prev parent reply other threads:[~2022-12-27 21:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-24 3:08 juzhe.zhong
2022-12-27 21:47 ` Jeff Law [this message]
[not found] ` <91200E8AE78D17FA+15C0DC8B-584B-48FB-B92F-6932C4CCEB51@rivai.ai>
2022-12-28 0:06 ` Jeff Law
2022-12-28 0:24 ` 钟居哲
2022-12-28 1:11 ` Jeff Law
2022-12-28 1:34 ` Kito Cheng
2022-12-28 5:20 ` 钟居哲
2022-12-28 11:47 ` Richard Sandiford
2022-12-28 11:57 ` 钟居哲
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=bbfef4c1-4d68-4855-a02f-8a3ebd16d060@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=kito.cheng@gmail.com \
--cc=palmer@dabbelt.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).