This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] cfgloopmanip.c: Remove split_loop_bb.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 06 Oct 2004 20:06:45 -0400 (EDT)
- Subject: [patch] cfgloopmanip.c: Remove split_loop_bb.
Hi,
Attached is a patch to remove split_loop_bb as it is unused.
In gcc-3.4, it used to be called from
loop-unroll.c:unroll_loop_runtime_iterations and
loop-unswitch.c:unswitch_single_loop, but neither of them calls it any
longer.
Bootstrapped on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2004-10-06 Kazu Hirata <kazu@cs.umass.edu>
* cfgloop.h: Remove the prototype for split_loop_bb.
* cfgloopmanip.c (split_loop_bb): Remove.
Index: cfgloop.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgloop.h,v
retrieving revision 1.32
diff -u -p -r1.32 cfgloop.h
--- cfgloop.h 23 Sep 2004 12:21:17 -0000 1.32
+++ cfgloop.h 6 Oct 2004 19:24:28 -0000
@@ -318,7 +318,6 @@ extern int duplicate_loop_to_header_edge
extern struct loop *loopify (struct loops *, edge, edge, basic_block, bool);
extern void unloop (struct loops *, struct loop *);
extern bool remove_path (struct loops *, edge);
-extern edge split_loop_bb (basic_block, void *);
/* Induction variable analysis. */
Index: cfgloopmanip.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgloopmanip.c,v
retrieving revision 1.33
diff -u -p -r1.33 cfgloopmanip.c
--- cfgloopmanip.c 28 Sep 2004 07:59:43 -0000 1.33
+++ cfgloopmanip.c 6 Oct 2004 19:24:28 -0000
@@ -50,22 +50,6 @@ static void fix_irreducible_loops (basic
#define RDIV(X,Y) (((X) + (Y) / 2) / (Y))
-/* Splits basic block BB after INSN, returns created edge. Updates loops
- and dominators. */
-edge
-split_loop_bb (basic_block bb, void *insn)
-{
- edge e;
-
- /* Split the block. */
- e = split_block (bb, insn);
-
- /* Add dest to loop. */
- add_bb_to_loop (e->dest, e->src->loop_father);
-
- return e;
-}
-
/* Checks whether basic block BB is dominated by DATA. */
static bool
rpe_enum_p (basic_block bb, void *data)