+2001-01-28 Jakub Jelinek <jakub@redhat.com>
+
+ * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
+ identical and they would be replaced with constant, remove
+ MODIFY_EXPR from the tree.
+
2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Make-lang.in: Remove all dependencies on defaults.h.
TREE_OPERAND (*tp, 1) = TREE_OPERAND (*tp, 3);
TREE_OPERAND (*tp, 3) = NULL_TREE;
}
+ else if (TREE_CODE (*tp) == MODIFY_EXPR
+ && TREE_OPERAND (*tp, 0) == TREE_OPERAND (*tp, 1)
+ && nonstatic_local_decl_p (TREE_OPERAND (*tp, 0))
+ && DECL_CONTEXT (TREE_OPERAND (*tp, 0)) == fn)
+ {
+ /* Assignments like a = a; don't generate any rtl code
+ and don't count as variable modification. Avoid
+ keeping bogosities like 0 = 0. */
+ tree decl = TREE_OPERAND (*tp, 0), value;
+ splay_tree_node n;
+
+ n = splay_tree_lookup (id->decl_map, (splay_tree_key) decl);
+ if (n)
+ {
+ value = (tree) n->value;
+ STRIP_TYPE_NOPS (value);
+ if (TREE_CONSTANT (value) || TREE_READONLY_DECL_P (value))
+ *tp = value;
+ }
+ }
}
/* Keep iterating. */
+2001-01-28 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.old-deja/g++.other/inline18.C: New test.
+
2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.c-torture/execute/stdio-opt-2.c: Also test __builtin_puts