This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa] tree-ssa-forwprop.c: Add a comment.


Hi,

Attached is a patch to add a comment.  OK to apply?

Kazu Hirata

2004-03-27  Kazu Hirata  <kazu@cs.umass.edu>

	* tree-ssa-forwprop.c: Add a comment about forward propagation
	of TRUTH_NOT_EXPR.

Index: tree-ssa-forwprop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-forwprop.c,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 tree-ssa-forwprop.c
--- tree-ssa-forwprop.c	16 Mar 2004 22:31:56 -0000	1.1.2.6
+++ tree-ssa-forwprop.c	28 Mar 2004 02:35:57 -0000
@@ -65,6 +65,21 @@
 
    Similarly for x = a - c1.
     
+   Or
+
+     bb0:
+       x = !a
+       if (x) goto ... else goto ...
+
+   Will be transformed into:
+
+     bb0:
+        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. 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]