[patch] cfghooks.c: Speed up delete_basic_block.
Kazu Hirata
kazu@cs.umass.edu
Thu Nov 4 01:12:00 GMT 2004
Hi,
Attached is a patch to speed up delete_basic_block by removing
meaningless code, namely, code to truncate edge vectors.
Right above these two calls to VEC_truncate, we have code to remove
all incoming and outgoing edges, so we don't need to truncate the edge
vectors.
Tested on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2004-11-04 Kazu Hirata <kazu@cs.umass.edu>
* cfghooks.c (delete_basic_block): Remove code to truncate
edge vectors.
Index: cfghooks.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfghooks.c,v
retrieving revision 1.17
diff -U5 -d -p -r1.17 cfghooks.c
--- cfghooks.c 16 Oct 2004 16:58:58 -0000 1.17
+++ cfghooks.c 3 Nov 2004 03:41:39 -0000
@@ -366,13 +366,10 @@ delete_basic_block (basic_block bb)
while (EDGE_COUNT (bb->preds) != 0)
remove_edge (EDGE_PRED (bb, 0));
while (EDGE_COUNT (bb->succs) != 0)
remove_edge (EDGE_SUCC (bb, 0));
- VEC_truncate (edge, bb->preds, 0);
- VEC_truncate (edge, bb->succs, 0);
-
if (dom_computed[CDI_DOMINATORS])
delete_from_dominance_info (CDI_DOMINATORS, bb);
if (dom_computed[CDI_POST_DOMINATORS])
delete_from_dominance_info (CDI_POST_DOMINATORS, bb);
More information about the Gcc-patches
mailing list