This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] O(1) PHI argument look-up - Part 7/n
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 Nov 2004 17:13:22 -0500 (EST)
- Subject: [patch] O(1) PHI argument look-up - Part 7/n
Hi,
Attached is a patch to part 7 of my O(1) PHI argument look-up patch.
This patch replaces ssa_remove_edge with remove_edge because
ssa_remove_edge has become a mere wrapper for remove_edge.
The patch also removes ssa_remove_edge.
Bootstrapped on i686-pc-linux-gnu on top of part 3 through 6:
http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01668.html
http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01679.html
http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01697.html
http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01706.html
Committed as preapproved by Jeff.
Kazu Hirata
2004-11-22 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa.c (ssa_remove_edge): Remove.
* tree-flow.h: Remove the corresponding prototype.
* tree-cfg.c: Replace ssa_remove_edge with remove_edge.
* basic-block.h: Likewise.
* tree-if-conv.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
diff -u tree-cfg.c tree-cfg.c
--- tree-cfg.c 21 Nov 2004 06:34:44 -0000
+++ tree-cfg.c 21 Nov 2004 06:34:55 -0000
@@ -1972,7 +1972,7 @@
/* Remove edges to BB's successors. */
while (EDGE_COUNT (bb->succs) > 0)
- ssa_remove_edge (EDGE_SUCC (bb, 0));
+ remove_edge (EDGE_SUCC (bb, 0));
}
@@ -2109,7 +2109,7 @@
{
taken_edge->probability += e->probability;
taken_edge->count += e->count;
- ssa_remove_edge (e);
+ remove_edge (e);
retval = true;
}
else
@@ -5303,7 +5303,7 @@
{
if (e->flags & EDGE_EH)
{
- ssa_remove_edge (e);
+ remove_edge (e);
changed = true;
}
else
diff -u tree-flow.h tree-flow.h
--- tree-flow.h 21 Nov 2004 06:34:45 -0000
+++ tree-flow.h 21 Nov 2004 06:34:56 -0000
@@ -573,7 +573,6 @@
extern void debug_def_blocks (void);
extern void dump_tree_ssa_stats (FILE *);
extern void debug_tree_ssa_stats (void);
-extern void ssa_remove_edge (edge);
extern edge ssa_redirect_edge (edge, basic_block);
extern void flush_pending_stmts (edge);
extern bool tree_ssa_useless_type_conversion (tree);
diff -u tree-ssa.c tree-ssa.c
--- tree-ssa.c 21 Nov 2004 06:34:46 -0000
+++ tree-ssa.c 21 Nov 2004 06:34:59 -0000
@@ -46,16 +46,6 @@
#include "tree-dump.h"
#include "tree-pass.h"
-
-/* Remove edge E and remove the corresponding arguments from the PHI nodes
- in E's destination block. */
-
-void
-ssa_remove_edge (edge e)
-{
- remove_edge (e);
-}
-
/* Remove the corresponding arguments from the PHI nodes in E's
destination block and redirect it to DEST. Return redirected edge.
The list of removed arguments is stored in PENDING_STMT (e). */
only in patch2:
unchanged:
--- basic-block.h 20 Nov 2004 05:02:28 -0000 1.228
+++ basic-block.h 21 Nov 2004 06:34:48 -0000
@@ -632,7 +632,7 @@ ei_safe_edge (edge_iterator i)
FOR (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); )
{
IF (e != taken_edge)
- ssa_remove_edge (e);
+ remove_edge (e);
ELSE
ei_next (&ei);
}
only in patch2:
unchanged:
--- tree-if-conv.c 16 Nov 2004 20:02:48 -0000 2.19
+++ tree-if-conv.c 21 Nov 2004 06:34:57 -0000
@@ -889,9 +889,9 @@ combine_blocks (struct loop *loop)
/* It is time to remove this basic block. First remove edges. */
while (EDGE_COUNT (bb->succs) > 0)
- ssa_remove_edge (EDGE_SUCC (bb, 0));
+ remove_edge (EDGE_SUCC (bb, 0));
while (EDGE_COUNT (bb->preds) > 0)
- ssa_remove_edge (EDGE_PRED (bb, 0));
+ remove_edge (EDGE_PRED (bb, 0));
/* Remove labels and make stmts member of loop->header. */
for (bsi = bsi_start (bb); !bsi_end_p (bsi); )
only in patch2:
unchanged:
--- tree-ssa-threadupdate.c 20 Nov 2004 12:48:13 -0000 2.15
+++ tree-ssa-threadupdate.c 21 Nov 2004 06:34:58 -0000
@@ -169,7 +169,7 @@ remove_ctrl_stmt_and_useless_edges (basi
for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); )
{
if (e->dest != dest_bb)
- ssa_remove_edge (e);
+ remove_edge (e);
else
ei_next (&ei);
}