From: Richard Sandiford <richard.sandiford@arm.com>
To: Hans-Peter Nilsson <hp@axis.com>
Cc: Jeff Law <jeffreyalaw@gmail.com>, <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 2/4] resource.cc: Replace calls to find_basic_block with cfgrtl BLOCK_FOR_INSN
Date: Fri, 31 May 2024 10:12:55 +0100 [thread overview]
Message-ID: <mpt8qzq8huw.fsf@arm.com> (raw)
In-Reply-To: <20240528201851.4A5F920408@pchp3.se.axis.com> (Hans-Peter Nilsson's message of "Tue, 28 May 2024 22:18:51 +0200")
Hans-Peter Nilsson <hp@axis.com> writes:
> [...]
> (Not-so-)fun fact: add_insn_after takes a bb parameter which
> reorg.cc always passes as NULL. But - the argument is
> *always ignored* and the bb in the "after" insn is used.
> I traced that ignored parameter as far as
> r0-81421-g6fb5fa3cbc0d78 "Merge dataflow branch into
> mainline" when is was added. I *guess* it's an artifact
> left over from some idea explored on that branch. Ripe for
> obvious cleanup by removal everywhere.
Heh. I wondered whether there'd be some direct callers of
add_insn_after_nobb that relied on the block *not* being updated
for some reason, but thankfully not. The only two callers seem
to be add_insn_after and emit_note_after. But then emit_note_after
handles notes slightly differently from add_insn_after, even though
logically, emitting an existing note should work in the same way
as emitting a new note.
So yeah, like you say, ripe for cleanup :)
Richard
prev parent reply other threads:[~2024-05-31 9:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 17:52 Hans-Peter Nilsson
2024-05-27 18:57 ` Jeff Law
2024-05-28 20:18 ` Hans-Peter Nilsson
2024-05-31 9:12 ` Richard Sandiford [this message]
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=mpt8qzq8huw.fsf@arm.com \
--to=richard.sandiford@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hp@axis.com \
--cc=jeffreyalaw@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).