This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Pretty print scalar evolutions
- From: Sebastian Pop <sebastian dot pop at cri dot ensmp dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 16 Jul 2004 18:36:35 +0200
- Subject: Pretty print scalar evolutions
Hello,
I have forgot to merge the pretty printing of the new tree nodes used
in the scalar evolution analyzer. This patch adds the missing bits
into mainline. Committed as obvious after bootstrap on i686.
Sebastian
2004-07-16 Sebastian Pop <pop@cri.ensmp.fr>
* Makefile.in (tree-pretty-print.o): Depend on tree-chrec.h.
* tree-pretty-print.c: Include tree-chrec.h.
(dump_generic_node): Pretty print SCEV_KNOWN, SCEV_NOT_KNOWN
and POLYNOMIAL_CHREC nodes.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1327
diff -d -u -p -r1.1327 Makefile.in
--- Makefile.in 13 Jul 2004 16:43:30 -0000 1.1327
+++ Makefile.in 16 Jul 2004 17:32:21 -0000
@@ -1738,7 +1738,7 @@ tree-nomudflap.o : $(CONFIG_H) errors.h
output.h varray.h langhooks.h tree-mudflap.h $(TM_H) coretypes.h
tree-pretty-print.o : tree-pretty-print.c $(CONFIG_H) $(SYSTEM_H) \
errors.h $(TREE_H) diagnostic.h real.h $(HASHTAB_H) $(TREE_FLOW_H) \
- $(TM_H) coretypes.h tree-iterator.h
+ $(TM_H) coretypes.h tree-iterator.h tree-chrec.h
fold-const.o : fold-const.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) $(FLAGS_H) real.h toplev.h $(HASHTAB_H) $(EXPR_H) $(RTL_H) $(GGC_H) \
$(TM_P_H) langhooks.h $(MD5_H)
Index: tree-pretty-print.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-pretty-print.c,v
retrieving revision 2.22
diff -d -u -p -r2.22 tree-pretty-print.c
--- tree-pretty-print.c 8 Jul 2004 07:45:45 -0000 2.22
+++ tree-pretty-print.c 16 Jul 2004 17:32:21 -0000
@@ -31,6 +31,7 @@ Software Foundation, 59 Temple Place - S
#include "tree-flow.h"
#include "langhooks.h"
#include "tree-iterator.h"
+#include "tree-chrec.h"
/* Local functions, macros and variables. */
static int op_prio (tree);
@@ -1416,6 +1417,24 @@ dump_generic_node (pretty_printer *buffe
pp_printf (buffer, "VH.%d", VALUE_HANDLE_ID (node));
break;
+ case SCEV_KNOWN:
+ pp_string (buffer, "scev_known");
+ break;
+
+ case SCEV_NOT_KNOWN:
+ pp_string (buffer, "scev_not_known");
+ break;
+
+ case POLYNOMIAL_CHREC:
+ pp_string (buffer, "{");
+ dump_generic_node (buffer, CHREC_LEFT (node), spc, flags, false);
+ pp_string (buffer, ", +, ");
+ dump_generic_node (buffer, CHREC_RIGHT (node), spc, flags, false);
+ pp_string (buffer, "}_");
+ dump_generic_node (buffer, CHREC_VAR (node), spc, flags, false);
+ is_stmt = false;
+ break;
+
default:
NIY;
}