This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Remove redundant calls to set_bb_for_stmt.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dpatel at apple dot com
- Date: Mon, 25 Apr 2005 23:22:31 -0400 (EDT)
- Subject: [patch] Remove redundant calls to set_bb_for_stmt.
Hi,
Attached is a patch to remove redundant calls to set_bb_for_stmt.
Note that both bsi_remove and bsi_insert_after call set_bb_for_stmt
themselves, so the user code doesn't need to call it on its own.
Tested on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2005-04-26 Kazu Hirata <kazu@cs.umass.edu>
* tree-cfg.c (remove_bb): Remove a redundant call to
set_bb_for_stmt.
* tree-if-conv.c (replace_phi_with_cond_modify_expr):
Likewise.
Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-cfg.c,v
retrieving revision 2.179
diff -u -d -p -r2.179 tree-cfg.c
--- tree-cfg.c 23 Apr 2005 21:27:56 -0000 2.179
+++ tree-cfg.c 24 Apr 2005 17:06:55 -0000
@@ -1972,7 +1972,6 @@ remove_bb (basic_block bb)
{
release_defs (stmt);
- set_bb_for_stmt (stmt, NULL);
bsi_remove (&i);
}
Index: tree-if-conv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-if-conv.c,v
retrieving revision 2.38
diff -u -d -p -r2.38 tree-if-conv.c
--- tree-if-conv.c 21 Apr 2005 17:02:15 -0000 2.38
+++ tree-if-conv.c 24 Apr 2005 17:06:56 -0000
@@ -799,9 +799,7 @@ replace_phi_with_cond_modify_expr (tree
/* Make new statement definition of the original phi result. */
SSA_NAME_DEF_STMT (PHI_RESULT (phi)) = new_stmt;
- /* Set basic block and insert using iterator. */
- set_bb_for_stmt (new_stmt, bb);
-
+ /* Insert using iterator. */
bsi_insert_after (bsi, new_stmt, BSI_SAME_STMT);
bsi_next (bsi);