public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org>
Cc: "juzhe.zhong" <juzhe.zhong@rivai.ai>,
	 Jeff Law <jeffreyalaw@gmail.com>,
	 "kito.cheng\@gmail.com" <kito.cheng@gmail.com>,
	 "palmer\@dabbelt.com" <palmer@dabbelt.com>
Subject: Re: [PATCH] RISC-V: Fix ICE of visiting non-existing block in CFG.
Date: Wed, 28 Dec 2022 11:47:55 +0000	[thread overview]
Message-ID: <mpt8rir3g2c.fsf@arm.com> (raw)
In-Reply-To: <30b1c78f-42ab-a634-67bf-7a54b0012a0e@gmail.com> (Jeff Law via Gcc-patches's message of "Tue, 27 Dec 2022 17:06:02 -0700")

Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> On 12/27/22 16:11, juzhe.zhong wrote:
>> You mean only change to this form you suggested in this patch? Since in 
>> all other places of this PASS,I use RTL_SSA framework to iterate 
>> instructions and blocks. I use RTL_SSA framework to iterate blocks here 
>> to make codes look more consistent even though they are same here.
> The FOR_EACH_BB is used far more widely than the C++ style found in 
> RTL-SSA so I'd slightly prefer that style.

I can see where you're coming from, but what the patch does is preferred
for RTL-SSA passes.  There is some additional information in
rtl_ssa::bb_info compared to the underlying basic_block, and even if
this particular loop doesn't use that information, IMO it would be
better to avoid mixing styles within a pass.

Also, the list that the patch iterates over is in reverse postorder,
whereas FOR_EACH_BB doesn't guarantee a particular order.  Again,
that might not be important here, but it seems better to stick to the
“native” RTL-SSA approach.

Thanks,
Richard

  parent reply	other threads:[~2022-12-28 11: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
     [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 [this message]
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=mpt8rir3g2c.fsf@arm.com \
    --to=richard.sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --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).