public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3385] Rename forwarder_block_p in treading code to empty_block_with_phis_p.
@ 2021-09-07 16:05 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2021-09-07 16:05 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:020e2db0a806d8d8250776734a4ad6263a75cb06

commit r12-3385-g020e2db0a806d8d8250776734a4ad6263a75cb06
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Sep 7 15:20:23 2021 +0200

    Rename forwarder_block_p in treading code to empty_block_with_phis_p.
    
    gcc/ChangeLog:
    
            * tree-ssa-threadedge.c (forwarder_block_p): Rename to...
            (empty_block_with_phis_p): ...this.
            (potentially_threadable_block): Same.
            (jump_threader::thread_through_normal_block): Same.

Diff:
---
 gcc/tree-ssa-threadedge.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
index 3db54a199fd..3c7cdc58b93 100644
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@ -101,11 +101,10 @@ has_phis_p (basic_block bb)
   return !gsi_end_p (gsi_start_phis (bb));
 }
 
-/* Return TRUE for a forwarder block which is defined as having PHIs
-   but no instructions.  */
+/* Return TRUE for a block with PHIs but no statements.  */
 
 static bool
-forwarder_block_p (basic_block bb)
+empty_block_with_phis_p (basic_block bb)
 {
   return gsi_end_p (gsi_start_nondebug_bb (bb)) && has_phis_p (bb);
 }
@@ -123,7 +122,7 @@ potentially_threadable_block (basic_block bb)
      to the loop header.   We want to thread through them as we can
      sometimes thread to the loop exit, which is obviously profitable.
      The interesting case here is when the block has PHIs.  */
-  if (forwarder_block_p (bb))
+  if (empty_block_with_phis_p (bb))
     return true;
 
   /* If BB has a single successor or a single predecessor, then
@@ -1008,7 +1007,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
     {
       /* First case.  The statement simply doesn't have any instructions, but
 	 does have PHIs.  */
-      if (forwarder_block_p (e->dest))
+      if (empty_block_with_phis_p (e->dest))
 	return 0;
 
       /* Second case.  */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-07 16:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 16:05 [gcc r12-3385] Rename forwarder_block_p in treading code to empty_block_with_phis_p Aldy Hernandez

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