This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH COMMITTED: Prepare to change alias set type
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 05 Sep 2007 22:59:31 -0700
- Subject: PATCH COMMITTED: Prepare to change alias set type
These are a few minor patches in preparation for committing a change
to alias_set_type.
LABEL_DECL_UID is stored in the pointer_alias_set field of the
tree_decl_common struct. This is a rather ugly bit of overloading.
However, I have not tried to fix it here. I've just added some casts
of LABEL_DECL_UID to int when printing it. This is safe, as
LABEL_DECL_UID is set from cfun->last_label_uid, which has type int.
I'm doing this because I plan to change alias_set_type to have type
int.
I also patched Makefile.in to note that rtl.h and tree.h now include
alias.h. It was a mistake for me not to make that change earlier.
Bootstrapped and tested on i686-pc-linux-gnu. Committed.
Ian
2007-09-05 Ian Lance Taylor <iant@google.com>
* tree-pretty-print.c (dump_decl_name): Cast LABEL_DECL_UID to int
when printing.
(dump_generic_node): Likewise.
* print-rtl.c (print_decl_name): Likewise.
* print-tree.c (print_node_brief): Likewise.
(print_node): Likewise.
* Makefile.in (RTL_BASE_H): Add alias.h.
(TREE_H): Likewise.
Index: tree-pretty-print.c
===================================================================
--- tree-pretty-print.c (revision 128174)
+++ tree-pretty-print.c (working copy)
@@ -179,8 +179,7 @@ dump_decl_name (pretty_printer *buffer,
{
if (TREE_CODE (t) == LABEL_DECL
&& LABEL_DECL_UID (t) != -1)
- pp_printf (buffer, "L.%wd",
- LABEL_DECL_UID (t));
+ pp_printf (buffer, "L.%d", (int) LABEL_DECL_UID (t));
else
{
char c = TREE_CODE (t) == CONST_DECL ? 'C' : 'D';
@@ -870,8 +869,7 @@ dump_generic_node (pretty_printer *buffe
if (DECL_NAME (node))
dump_decl_name (buffer, node, flags);
else if (LABEL_DECL_UID (node) != -1)
- pp_printf (buffer, "<L%wd>",
- LABEL_DECL_UID (node));
+ pp_printf (buffer, "<L%d>", (int) LABEL_DECL_UID (node));
else
pp_printf (buffer, "<D.%u>", DECL_UID (node));
break;
Index: print-rtl.c
===================================================================
--- print-rtl.c (revision 128174)
+++ print-rtl.c (working copy)
@@ -75,7 +75,7 @@ print_decl_name (FILE *outfile, const_tr
else
{
if (TREE_CODE (node) == LABEL_DECL && LABEL_DECL_UID (node) != -1)
- fprintf (outfile, "L." HOST_WIDE_INT_PRINT_DEC, LABEL_DECL_UID (node));
+ fprintf (outfile, "L.%d", (int) LABEL_DECL_UID (node));
else
{
char c = TREE_CODE (node) == CONST_DECL ? 'C' : 'D';
Index: print-tree.c
===================================================================
--- print-tree.c (revision 128174)
+++ print-tree.c (working copy)
@@ -92,7 +92,7 @@ print_node_brief (FILE *file, const char
fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
else if (TREE_CODE (node) == LABEL_DECL
&& LABEL_DECL_UID (node) != -1)
- fprintf (file, " L." HOST_WIDE_INT_PRINT_DEC, LABEL_DECL_UID (node));
+ fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
else
fprintf (file, " %c.%u", TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
DECL_UID (node));
@@ -250,7 +250,7 @@ print_node (FILE *file, const char *pref
fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
else if (TREE_CODE (node) == LABEL_DECL
&& LABEL_DECL_UID (node) != -1)
- fprintf (file, " L." HOST_WIDE_INT_PRINT_DEC, LABEL_DECL_UID (node));
+ fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
else
fprintf (file, " %c.%u", TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
DECL_UID (node));
Index: Makefile.in
===================================================================
--- Makefile.in (revision 128174)
+++ Makefile.in (working copy)
@@ -770,13 +770,13 @@ HOSTHOOKS_DEF_H = hosthooks-def.h $(HOOK
LANGHOOKS_DEF_H = langhooks-def.h $(HOOKS_H)
TARGET_DEF_H = target-def.h $(HOOKS_H)
RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H) reg-notes.def insn-notes.def \
- input.h $(REAL_H) statistics.h vec.h fixed-value.h
+ input.h $(REAL_H) statistics.h vec.h fixed-value.h alias.h
RTL_H = $(RTL_BASE_H) genrtl.h
PARAMS_H = params.h params.def
BUILTINS_DEF = builtins.def sync-builtins.def omp-builtins.def
TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h $(BUILTINS_DEF) \
input.h statistics.h vec.h treestruct.def $(HASHTAB_H) \
- double-int.h
+ double-int.h alias.h
BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h $(PARTITION_H) \
hard-reg-set.h cfghooks.h $(OBSTACK_H)
GCOV_IO_H = gcov-io.h gcov-iov.h auto-host.h