public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Avoid repeated forwarder_block_p calls in CFG cleanup
@ 2023-04-19 10:32 Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2023-04-19 10:32 UTC (permalink / raw)
  To: gcc-patches

CFG cleanup maintains BB_FORWARDER_BLOCK and uses FORWARDER_BLOCK_P
to check that apart from two places which use forwarder_block_p
in outgoing_edges_match alongside many BB_FORWARDER_BLOCK uses.

The following adjusts those.

Bootstrapped and tested on x86_64-unknown-linux-gnu, I verified
cc1files produce the same code with/without this patch.

OK?

Thanks,
Richard.

	* cfgcleanup.cc (outgoing_edges_match): Use FORWARDER_BLOCK_P.
---
 gcc/cfgcleanup.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/cfgcleanup.cc b/gcc/cfgcleanup.cc
index 78f59e99653..5f1aa29c89d 100644
--- a/gcc/cfgcleanup.cc
+++ b/gcc/cfgcleanup.cc
@@ -1861,9 +1861,9 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2)
   /* fallthru edges must be forwarded to the same destination.  */
   if (fallthru1)
     {
-      basic_block d1 = (forwarder_block_p (fallthru1->dest)
+      basic_block d1 = (FORWARDER_BLOCK_P (fallthru1->dest)
 			? single_succ (fallthru1->dest): fallthru1->dest);
-      basic_block d2 = (forwarder_block_p (fallthru2->dest)
+      basic_block d2 = (FORWARDER_BLOCK_P (fallthru2->dest)
 			? single_succ (fallthru2->dest): fallthru2->dest);
 
       if (d1 != d2)
-- 
2.35.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Avoid repeated forwarder_block_p calls in CFG cleanup
       [not found] <20230419103303.3E47D385841E@sourceware.org>
@ 2023-04-22 21:53 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-04-22 21:53 UTC (permalink / raw)
  To: Richard Biener, gcc-patches



On 4/19/23 04:32, Richard Biener via Gcc-patches wrote:
> CFG cleanup maintains BB_FORWARDER_BLOCK and uses FORWARDER_BLOCK_P
> to check that apart from two places which use forwarder_block_p
> in outgoing_edges_match alongside many BB_FORWARDER_BLOCK uses.
> 
> The following adjusts those.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu, I verified
> cc1files produce the same code with/without this patch.
> 
> OK?
> 
> Thanks,
> Richard.
> 
> 	* cfgcleanup.cc (outgoing_edges_match): Use FORWARDER_BLOCK_P.
OK
jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-22 21:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-19 10:32 [PATCH] Avoid repeated forwarder_block_p calls in CFG cleanup Richard Biener
     [not found] <20230419103303.3E47D385841E@sourceware.org>
2023-04-22 21:53 ` Jeff Law

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).