This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa][PATCH] Mark TMT's for renaming when rewriting into ssa
- From: Brian Booth <bbooth at redhat dot com>
- To: GCC-Patches <gcc-patches at gcc dot gnu dot org>
- Date: 29 Mar 2004 10:30:35 -0500
- Subject: [tree-ssa][PATCH] Mark TMT's for renaming when rewriting into ssa
- Organization:
When a pointer is marked for renaming, it's NMT is marked for renaming,
but not it's TMT. This was causing verify_ssa to fail when compiling
newlib. This patch marks TMT's for renaming in this case. Tested on
i686-pc-linux-gnu.
Brian
---
2004-03-29 Brian Booth <bbooth@redhat.com>
* tree-into-ssa.c (rewrite_into_ssa): Edit condition that marks
NMT's for renaming to include all memory tags. Update comment.
Index: tree-into-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-into-ssa.c,v
retrieving revision 1.1.2.2
diff -c -p -r1.1.2.2 tree-into-ssa.c
*** tree-into-ssa.c 23 Mar 2004 23:21:07 -0000 1.1.2.2
--- tree-into-ssa.c 26 Mar 2004 14:52:07 -0000
*************** rewrite_into_ssa (void)
*** 1012,1020 ****
bool rename_name_tags_p;
/* If any of the variables in VARS_TO_RENAME is a pointer, we need to
! invalidate all the name memory tags associated with the variables
that we are about to rename. FIXME: Currently we just invalidate
! *all* the NMTs. Make this more selective. */
rename_name_tags_p = false;
EXECUTE_IF_SET_IN_BITMAP (vars_to_rename, 0, i,
if (POINTER_TYPE_P (TREE_TYPE (referenced_var (i))))
--- 1012,1020 ----
bool rename_name_tags_p;
/* If any of the variables in VARS_TO_RENAME is a pointer, we need to
! invalidate all the name & type memory tags associated with the variables
that we are about to rename. FIXME: Currently we just invalidate
! *all* the NMT's and TMT's. Make this more selective. */
rename_name_tags_p = false;
EXECUTE_IF_SET_IN_BITMAP (vars_to_rename, 0, i,
if (POINTER_TYPE_P (TREE_TYPE (referenced_var (i))))
*************** rewrite_into_ssa (void)
*** 1028,1034 ****
{
var_ann_t ann = var_ann (referenced_var (i));
! if (ann->mem_tag_kind == NAME_TAG)
bitmap_set_bit (vars_to_rename, ann->uid);
}
--- 1028,1034 ----
{
var_ann_t ann = var_ann (referenced_var (i));
! if (ann->mem_tag_kind != NOT_A_TAG)
bitmap_set_bit (vars_to_rename, ann->uid);
}