This is the mail archive of the
mailing list for the GCC project.
[tree-ssa] tree-ssa-forwprop.c: Add a comment.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: law at redhat dot com
- Date: Sat, 27 Mar 2004 21:39:05 -0500 (EST)
- Subject: [tree-ssa] tree-ssa-forwprop.c: Add a comment.
Attached is a patch to add a comment. OK to apply?
2004-03-27 Kazu Hirata <email@example.com>
* tree-ssa-forwprop.c: Add a comment about forward propagation
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-forwprop.c,v
retrieving revision 184.108.40.206
diff -u -r220.127.116.11 tree-ssa-forwprop.c
--- tree-ssa-forwprop.c 16 Mar 2004 22:31:56 -0000 18.104.22.168
+++ tree-ssa-forwprop.c 28 Mar 2004 02:35:57 -0000
@@ -65,6 +65,21 @@
Similarly for x = a - c1.
+ x = !a
+ if (x) goto ... else goto ...
+ Will be transformed into:
+ if (a == 0) goto ... else goto ...
+ Similarly for the tests (x == 0), (x != 0), (x == 1) and (x != 1).
+ For these cases, we propagate A into all, possibly more than one,
+ COND_EXPRs that use X.
In addition to eliminating the variable and the statement which assigns
a value to the variable, we may be able to later thread the jump without
adding insane complexity in the dominator optimizer.