This is the mail archive of the
mailing list for the GCC project.
[patch] tree-cfg.c: Remove an "if" statement that never trigers.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 06 Nov 2004 08:31:12 -0500 (EST)
- Subject: [patch] tree-cfg.c: Remove an "if" statement that never trigers.
Attached is a patch to remove an "if" statement that never trigers.
We *always* have two distinct outgoing edges for basic blocks ending
with COND_EXPR. If the two destinations end up being the same as a
result of edge redirection, COND_EXPR is removed at the same time.
Tested on i686-pc-linux-gnu. OK to apply?
2004-11-06 Kazu Hirata <email@example.com>
* tree-cfg.c (find_taken_edge_cond_expr): Remove an "if"
statement that never triggers.
RCS file: /cvs/gcc/gcc/gcc/tree-cfg.c,v
retrieving revision 2.100
diff -u -d -p -r2.100 tree-cfg.c
--- tree-cfg.c 4 Nov 2004 22:07:37 -0000 2.100
+++ tree-cfg.c 5 Nov 2004 22:54:38 -0000
@@ -1987,11 +1987,6 @@ find_taken_edge_cond_expr (basic_block b
extract_true_false_edges_from_block (bb, &true_edge, &false_edge);
- /* If both edges of the branch lead to the same basic block, it doesn't
- matter which edge is taken. */
- if (true_edge->dest == false_edge->dest)
- return true_edge;
/* Otherwise, try to determine which branch of the if() will be taken.
If VAL is a constant but it can't be reduced to a 0 or a 1, then
we don't really know which edge will be taken at runtime. This