This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa mudflap] Mark decls as addressable
- From: graydon at redhat dot com
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 31 Aug 2002 00:14:16 -0400
- Subject: [tree-ssa mudflap] Mark decls as addressable
- Reply-to: graydon at redhat dot com
Just committed the following one liner to mudflap, as suggested by
dnovillo. This helps with cases in which mudflap registers a
__complex__ which a later optimization in gcc decides to move into a
machine register. This optimization was confusing the synthesized
register and check code.
-graydon
[ gcc/ChangeLog.tree-ssa ]
2002-08-30 Graydon Hoare <graydon@redhat.com>
* tree-mudflap.c (mx_register_decl): Mark declarations as
TREE_ADDRESSABLE when mudflap decides to register them.
Index: gcc/ChangeLog.tree-ssa
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/ChangeLog.tree-ssa,v
retrieving revision 1.1.2.39
diff -u -r1.1.2.39 ChangeLog.tree-ssa
--- gcc/ChangeLog.tree-ssa 29 Aug 2002 20:20:53 -0000 1.1.2.39
+++ gcc/ChangeLog.tree-ssa 31 Aug 2002 04:06:23 -0000
@@ -1,3 +1,8 @@
+2002-08-30 Graydon Hoare <graydon@redhat.com>
+
+ * tree-mudflap.c (mx_register_decl): Mark declarations as
+ TREE_ADDRESSABLE when mudflap decides to register them.
+
2002-08-29 Graydon Hoare <graydon@redhat.com>
* tree-mudflap.c (mx_xfn_indirect_ref): Rewrite array references as
Index: gcc/tree-mudflap.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-mudflap.c,v
retrieving revision 1.1.2.9
diff -u -r1.1.2.9 tree-mudflap.c
--- gcc/tree-mudflap.c 29 Aug 2002 20:20:53 -0000 1.1.2.9
+++ gcc/tree-mudflap.c 31 Aug 2002 04:06:24 -0000
@@ -911,6 +911,10 @@
(! TREE_STATIC (decl)) &&
mf_find_addrof (containing_stmt, decl))
{
+
+ /* Hint to inhibit any fancy register optimizations on this variable. */
+ TREE_ADDRESSABLE(decl) = 1;
+
/* Synthesize, for this DECL_STMT, a CLEANUP_DECL for the same
VAR_DECL. Arrange to call the __mf_register function now, and the
__mf_unregister function later. */