public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Remove redundant functions
@ 2023-09-11 13:39 Jeff Law
  0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2023-09-11 13:39 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ecf73232e00811aedbca94f17e18689792553d3b

commit ecf73232e00811aedbca94f17e18689792553d3b
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date:   Mon Sep 11 17:19:30 2023 +0800

    RISC-V: Remove redundant functions
    
    I just finished V2 version of LMUL cost model.
    Turns out we don't these redundant functions.
    
    Remove them.
    
    gcc/ChangeLog:
    
            * config/riscv/riscv-protos.h (get_all_predecessors): Remove.
            (get_all_successors): Ditto.
            * config/riscv/riscv-v.cc (get_all_predecessors): Ditto.
            (get_all_successors): Ditto.
    
    (cherry picked from commit 48d4ab698036de859e194edc037faed2ef9b58a5)

Diff:
---
 gcc/config/riscv/riscv-protos.h |  2 --
 gcc/config/riscv/riscv-v.cc     | 48 -----------------------------------------
 2 files changed, 50 deletions(-)

diff --git a/gcc/config/riscv/riscv-protos.h b/gcc/config/riscv/riscv-protos.h
index 46d77ef927c2..e91a55ec0571 100644
--- a/gcc/config/riscv/riscv-protos.h
+++ b/gcc/config/riscv/riscv-protos.h
@@ -498,8 +498,6 @@ enum floating_point_rounding_mode get_frm_mode (rtx);
 opt_machine_mode vectorize_related_mode (machine_mode, scalar_mode,
 					 poly_uint64);
 unsigned int autovectorize_vector_modes (vec<machine_mode> *, bool);
-hash_set<basic_block> get_all_predecessors (basic_block);
-hash_set<basic_block> get_all_successors (basic_block);
 bool cmp_lmul_le_one (machine_mode);
 bool cmp_lmul_gt_one (machine_mode);
 }
diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc
index 3cd1f61de0ee..4d95bd773a2c 100644
--- a/gcc/config/riscv/riscv-v.cc
+++ b/gcc/config/riscv/riscv-v.cc
@@ -3388,54 +3388,6 @@ expand_fold_extract_last (rtx *ops)
   emit_label (end_label);
 }
 
-hash_set<basic_block>
-get_all_predecessors (basic_block bb)
-{
-  hash_set<basic_block> blocks;
-  auto_vec<basic_block> work_list;
-  hash_set<basic_block> visited_list;
-  work_list.safe_push (bb);
-
-  while (!work_list.is_empty ())
-    {
-      basic_block new_bb = work_list.pop ();
-      visited_list.add (new_bb);
-      edge e;
-      edge_iterator ei;
-      FOR_EACH_EDGE (e, ei, new_bb->preds)
-	{
-	  if (!visited_list.contains (e->src))
-	    work_list.safe_push (e->src);
-	  blocks.add (e->src);
-	}
-    }
-  return blocks;
-}
-
-hash_set<basic_block>
-get_all_successors (basic_block bb)
-{
-  hash_set<basic_block> blocks;
-  auto_vec<basic_block> work_list;
-  hash_set<basic_block> visited_list;
-  work_list.safe_push (bb);
-
-  while (!work_list.is_empty ())
-    {
-      basic_block new_bb = work_list.pop ();
-      visited_list.add (new_bb);
-      edge e;
-      edge_iterator ei;
-      FOR_EACH_EDGE (e, ei, new_bb->succs)
-	{
-	  if (!visited_list.contains (e->dest))
-	    work_list.safe_push (e->dest);
-	  blocks.add (e->dest);
-	}
-    }
-  return blocks;
-}
-
 /* Return true if the LMUL of comparison less than or equal to one.  */
 bool
 cmp_lmul_le_one (machine_mode mode)

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

only message in thread, other threads:[~2023-09-11 13:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 13:39 [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Remove redundant functions 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).