annotate gcc/tree-pretty-print.c @ 16:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* Pretty formatting of GENERIC trees in C syntax.
16
kono
parents: 14
diff changeset
2 Copyright (C) 2001-2017 Free Software Foundation, Inc.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 Adapted from c-pretty-print.c by Diego Novillo <dnovillo@redhat.com>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 This file is part of GCC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify it under
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 the terms of the GNU General Public License as published by the Free
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 Software Foundation; either version 3, or (at your option) any later
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 version.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 for more details.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 along with GCC; see the file COPYING3. If not see
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 <http://www.gnu.org/licenses/>. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 #include "config.h"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 #include "system.h"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 #include "coretypes.h"
16
kono
parents: 14
diff changeset
24 #include "backend.h"
kono
parents: 14
diff changeset
25 #include "rtl.h"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 #include "tree.h"
16
kono
parents: 14
diff changeset
27 #include "predict.h"
kono
parents: 14
diff changeset
28 #include "cgraph.h"
11
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
29 #include "tree-pretty-print.h"
16
kono
parents: 14
diff changeset
30 #include "stor-layout.h"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 #include "langhooks.h"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 #include "tree-iterator.h"
16
kono
parents: 14
diff changeset
33 #include "dumpfile.h"
kono
parents: 14
diff changeset
34 #include "internal-fn.h"
kono
parents: 14
diff changeset
35 #include "gomp-constants.h"
kono
parents: 14
diff changeset
36 #include "gimple.h"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 /* Local functions, macros and variables. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 static const char *op_symbol (const_tree);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 static void pretty_print_string (pretty_printer *, const char*);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 static void newline_and_indent (pretty_printer *, int);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 static void maybe_init_pretty_print (FILE *);
16
kono
parents: 14
diff changeset
43 static void print_struct_decl (pretty_printer *, const_tree, int, dump_flags_t);
kono
parents: 14
diff changeset
44 static void do_niy (pretty_printer *, const_tree, dump_flags_t);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 #define INDENT(SPACE) do { \
16
kono
parents: 14
diff changeset
47 int i; for (i = 0; i<SPACE; i++) pp_space (pp); } while (0)
kono
parents: 14
diff changeset
48
kono
parents: 14
diff changeset
49 #define NIY do_niy (pp, node, flags)
kono
parents: 14
diff changeset
50
kono
parents: 14
diff changeset
51 static pretty_printer *tree_pp;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 /* Try to print something for an unknown tree code. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 static void
16
kono
parents: 14
diff changeset
56 do_niy (pretty_printer *pp, const_tree node, dump_flags_t flags)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 int i, len;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59
16
kono
parents: 14
diff changeset
60 pp_string (pp, "<<< Unknown tree: ");
kono
parents: 14
diff changeset
61 pp_string (pp, get_tree_code_name (TREE_CODE (node)));
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 if (EXPR_P (node))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 len = TREE_OPERAND_LENGTH (node);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 for (i = 0; i < len; ++i)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 {
16
kono
parents: 14
diff changeset
68 newline_and_indent (pp, 2);
kono
parents: 14
diff changeset
69 dump_generic_node (pp, TREE_OPERAND (node, i), 2, flags, false);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72
16
kono
parents: 14
diff changeset
73 pp_string (pp, " >>>");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 /* Debugging function to print out a generic expression. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
78 DEBUG_FUNCTION void
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 debug_generic_expr (tree t)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 print_generic_expr (stderr, t, TDF_VOPS|TDF_MEMSYMS);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 fprintf (stderr, "\n");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 /* Debugging function to print out a generic statement. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
87 DEBUG_FUNCTION void
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 debug_generic_stmt (tree t)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 print_generic_stmt (stderr, t, TDF_VOPS|TDF_MEMSYMS);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 fprintf (stderr, "\n");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
93
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 /* Debugging function to print out a chain of trees . */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
95
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
96 DEBUG_FUNCTION void
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 debug_tree_chain (tree t)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 {
16
kono
parents: 14
diff changeset
99 hash_set<tree> seen;
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
100
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 while (t)
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
102 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
103 print_generic_expr (stderr, t, TDF_VOPS|TDF_MEMSYMS|TDF_UID);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
104 fprintf (stderr, " ");
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
105 t = TREE_CHAIN (t);
16
kono
parents: 14
diff changeset
106 if (seen.add (t))
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
107 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
108 fprintf (stderr, "... [cycled back to ");
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
109 print_generic_expr (stderr, t, TDF_VOPS|TDF_MEMSYMS|TDF_UID);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
110 fprintf (stderr, "]");
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
111 break;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
112 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
113 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 fprintf (stderr, "\n");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 /* Prints declaration DECL to the FILE with details specified by FLAGS. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 void
16
kono
parents: 14
diff changeset
119 print_generic_decl (FILE *file, tree decl, dump_flags_t flags)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 maybe_init_pretty_print (file);
16
kono
parents: 14
diff changeset
122 print_declaration (tree_pp, decl, 2, flags);
kono
parents: 14
diff changeset
123 pp_write_text_to_stream (tree_pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
125
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 /* Print tree T, and its successors, on file FILE. FLAGS specifies details
16
kono
parents: 14
diff changeset
127 to show in the dump. See TDF_* in dumpfile.h. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 void
16
kono
parents: 14
diff changeset
130 print_generic_stmt (FILE *file, tree t, dump_flags_t flags)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 maybe_init_pretty_print (file);
16
kono
parents: 14
diff changeset
133 dump_generic_node (tree_pp, t, 0, flags, true);
kono
parents: 14
diff changeset
134 pp_newline_and_flush (tree_pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
136
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 /* Print tree T, and its successors, on file FILE. FLAGS specifies details
16
kono
parents: 14
diff changeset
138 to show in the dump. See TDF_* in dumpfile.h. The output is indented by
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 INDENT spaces. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
140
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 void
16
kono
parents: 14
diff changeset
142 print_generic_stmt_indented (FILE *file, tree t, dump_flags_t flags, int indent)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 int i;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
145
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 maybe_init_pretty_print (file);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
147
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 for (i = 0; i < indent; i++)
16
kono
parents: 14
diff changeset
149 pp_space (tree_pp);
kono
parents: 14
diff changeset
150 dump_generic_node (tree_pp, t, indent, flags, true);
kono
parents: 14
diff changeset
151 pp_newline_and_flush (tree_pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
153
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 /* Print a single expression T on file FILE. FLAGS specifies details to show
16
kono
parents: 14
diff changeset
155 in the dump. See TDF_* in dumpfile.h. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
156
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 void
16
kono
parents: 14
diff changeset
158 print_generic_expr (FILE *file, tree t, dump_flags_t flags)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 maybe_init_pretty_print (file);
16
kono
parents: 14
diff changeset
161 dump_generic_node (tree_pp, t, 0, flags, false);
kono
parents: 14
diff changeset
162 pp_flush (tree_pp);
kono
parents: 14
diff changeset
163 }
kono
parents: 14
diff changeset
164
kono
parents: 14
diff changeset
165 /* Dump NAME, an IDENTIFIER_POINTER, sanitized so that D<num> sequences
kono
parents: 14
diff changeset
166 in it are replaced with Dxxxx, as long as they are at the start or
kono
parents: 14
diff changeset
167 preceded by $ and at the end or followed by $. See make_fancy_name
kono
parents: 14
diff changeset
168 in tree-sra.c. */
kono
parents: 14
diff changeset
169
kono
parents: 14
diff changeset
170 static void
kono
parents: 14
diff changeset
171 dump_fancy_name (pretty_printer *pp, tree name)
kono
parents: 14
diff changeset
172 {
kono
parents: 14
diff changeset
173 int cnt = 0;
kono
parents: 14
diff changeset
174 int length = IDENTIFIER_LENGTH (name);
kono
parents: 14
diff changeset
175 const char *n = IDENTIFIER_POINTER (name);
kono
parents: 14
diff changeset
176 do
kono
parents: 14
diff changeset
177 {
kono
parents: 14
diff changeset
178 n = strchr (n, 'D');
kono
parents: 14
diff changeset
179 if (n == NULL)
kono
parents: 14
diff changeset
180 break;
kono
parents: 14
diff changeset
181 if (ISDIGIT (n[1])
kono
parents: 14
diff changeset
182 && (n == IDENTIFIER_POINTER (name) || n[-1] == '$'))
kono
parents: 14
diff changeset
183 {
kono
parents: 14
diff changeset
184 int l = 2;
kono
parents: 14
diff changeset
185 while (ISDIGIT (n[l]))
kono
parents: 14
diff changeset
186 l++;
kono
parents: 14
diff changeset
187 if (n[l] == '\0' || n[l] == '$')
kono
parents: 14
diff changeset
188 {
kono
parents: 14
diff changeset
189 cnt++;
kono
parents: 14
diff changeset
190 length += 5 - l;
kono
parents: 14
diff changeset
191 }
kono
parents: 14
diff changeset
192 n += l;
kono
parents: 14
diff changeset
193 }
kono
parents: 14
diff changeset
194 else
kono
parents: 14
diff changeset
195 n++;
kono
parents: 14
diff changeset
196 }
kono
parents: 14
diff changeset
197 while (1);
kono
parents: 14
diff changeset
198 if (cnt == 0)
kono
parents: 14
diff changeset
199 {
kono
parents: 14
diff changeset
200 pp_tree_identifier (pp, name);
kono
parents: 14
diff changeset
201 return;
kono
parents: 14
diff changeset
202 }
kono
parents: 14
diff changeset
203
kono
parents: 14
diff changeset
204 char *str = XNEWVEC (char, length + 1);
kono
parents: 14
diff changeset
205 char *p = str;
kono
parents: 14
diff changeset
206 const char *q;
kono
parents: 14
diff changeset
207 q = n = IDENTIFIER_POINTER (name);
kono
parents: 14
diff changeset
208 do
kono
parents: 14
diff changeset
209 {
kono
parents: 14
diff changeset
210 q = strchr (q, 'D');
kono
parents: 14
diff changeset
211 if (q == NULL)
kono
parents: 14
diff changeset
212 break;
kono
parents: 14
diff changeset
213 if (ISDIGIT (q[1])
kono
parents: 14
diff changeset
214 && (q == IDENTIFIER_POINTER (name) || q[-1] == '$'))
kono
parents: 14
diff changeset
215 {
kono
parents: 14
diff changeset
216 int l = 2;
kono
parents: 14
diff changeset
217 while (ISDIGIT (q[l]))
kono
parents: 14
diff changeset
218 l++;
kono
parents: 14
diff changeset
219 if (q[l] == '\0' || q[l] == '$')
kono
parents: 14
diff changeset
220 {
kono
parents: 14
diff changeset
221 memcpy (p, n, q - n);
kono
parents: 14
diff changeset
222 memcpy (p + (q - n), "Dxxxx", 5);
kono
parents: 14
diff changeset
223 p += (q - n) + 5;
kono
parents: 14
diff changeset
224 n = q + l;
kono
parents: 14
diff changeset
225 }
kono
parents: 14
diff changeset
226 q += l;
kono
parents: 14
diff changeset
227 }
kono
parents: 14
diff changeset
228 else
kono
parents: 14
diff changeset
229 q++;
kono
parents: 14
diff changeset
230 }
kono
parents: 14
diff changeset
231 while (1);
kono
parents: 14
diff changeset
232 memcpy (p, n, IDENTIFIER_LENGTH (name) - (n - IDENTIFIER_POINTER (name)));
kono
parents: 14
diff changeset
233 str[length] = '\0';
kono
parents: 14
diff changeset
234 if (pp_translate_identifiers (pp))
kono
parents: 14
diff changeset
235 {
kono
parents: 14
diff changeset
236 const char *text = identifier_to_locale (str);
kono
parents: 14
diff changeset
237 pp_append_text (pp, text, text + strlen (text));
kono
parents: 14
diff changeset
238 }
kono
parents: 14
diff changeset
239 else
kono
parents: 14
diff changeset
240 pp_append_text (pp, str, str + length);
kono
parents: 14
diff changeset
241 XDELETEVEC (str);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 /* Dump the name of a _DECL node and its DECL_UID if TDF_UID is set
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
245 in FLAGS. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
246
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 static void
16
kono
parents: 14
diff changeset
248 dump_decl_name (pretty_printer *pp, tree node, dump_flags_t flags)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
249 {
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
250 if (DECL_NAME (node))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
251 {
16
kono
parents: 14
diff changeset
252 if ((flags & TDF_ASMNAME)
kono
parents: 14
diff changeset
253 && HAS_DECL_ASSEMBLER_NAME_P (node)
kono
parents: 14
diff changeset
254 && DECL_ASSEMBLER_NAME_SET_P (node))
kono
parents: 14
diff changeset
255 pp_tree_identifier (pp, DECL_ASSEMBLER_NAME_RAW (node));
kono
parents: 14
diff changeset
256 /* For DECL_NAMELESS names look for embedded uids in the
kono
parents: 14
diff changeset
257 names and sanitize them for TDF_NOUID. */
kono
parents: 14
diff changeset
258 else if ((flags & TDF_NOUID) && DECL_NAMELESS (node))
kono
parents: 14
diff changeset
259 dump_fancy_name (pp, DECL_NAME (node));
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
260 else
16
kono
parents: 14
diff changeset
261 pp_tree_identifier (pp, DECL_NAME (node));
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
262 }
16
kono
parents: 14
diff changeset
263 char uid_sep = (flags & TDF_GIMPLE) ? '_' : '.';
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
264 if ((flags & TDF_UID) || DECL_NAME (node) == NULL_TREE)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
265 {
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
266 if (TREE_CODE (node) == LABEL_DECL && LABEL_DECL_UID (node) != -1)
16
kono
parents: 14
diff changeset
267 pp_printf (pp, "L%c%d", uid_sep, (int) LABEL_DECL_UID (node));
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
268 else if (TREE_CODE (node) == DEBUG_EXPR_DECL)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
269 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
270 if (flags & TDF_NOUID)
16
kono
parents: 14
diff changeset
271 pp_string (pp, "D#xxxx");
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
272 else
16
kono
parents: 14
diff changeset
273 pp_printf (pp, "D#%i", DEBUG_TEMP_UID (node));
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
274 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
275 else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
276 {
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
277 char c = TREE_CODE (node) == CONST_DECL ? 'C' : 'D';
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
278 if (flags & TDF_NOUID)
16
kono
parents: 14
diff changeset
279 pp_printf (pp, "%c.xxxx", c);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
280 else
16
kono
parents: 14
diff changeset
281 pp_printf (pp, "%c%c%u", c, uid_sep, DECL_UID (node));
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
282 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 }
11
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
284 if ((flags & TDF_ALIAS) && DECL_PT_UID (node) != DECL_UID (node))
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
285 {
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
286 if (flags & TDF_NOUID)
16
kono
parents: 14
diff changeset
287 pp_printf (pp, "ptD.xxxx");
11
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
288 else
16
kono
parents: 14
diff changeset
289 pp_printf (pp, "ptD.%u", DECL_PT_UID (node));
11
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 9
diff changeset
290 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
292
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 /* Like the above, but used for pretty printing function calls. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
294
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
295 static void
16
kono
parents: 14
diff changeset
296 dump_function_name (pretty_printer *pp, tree node, dump_flags_t flags)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
297 {
16
kono
parents: 14
diff changeset
298 if (CONVERT_EXPR_P (node))
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
299 node = TREE_OPERAND (node, 0);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
300 if (DECL_NAME (node) && (flags & TDF_ASMNAME) == 0)
16
kono
parents: 14
diff changeset
301 pp_string (pp, lang_hooks.decl_printable_name (node, 1));
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
302 else
16
kono
parents: 14
diff changeset
303 dump_decl_name (pp, node, flags);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
305
16
kono
parents: 14
diff changeset
306 /* Dump a function declaration. NODE is the FUNCTION_TYPE. PP, SPC and
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
307 FLAGS are as in dump_generic_node. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
308
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
309 static void
16
kono
parents: 14
diff changeset
310 dump_function_declaration (pretty_printer *pp, tree node,
kono
parents: 14
diff changeset
311 int spc, dump_flags_t flags)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
312 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
313 bool wrote_arg = false;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 tree arg;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
315
16
kono
parents: 14
diff changeset
316 pp_space (pp);
kono
parents: 14
diff changeset
317 pp_left_paren (pp);
kono
parents: 14
diff changeset
318
kono
parents: 14
diff changeset
319 /* Print the argument types. */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
320 arg = TYPE_ARG_TYPES (node);
16
kono
parents: 14
diff changeset
321 while (arg && arg != void_list_node && arg != error_mark_node)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
322 {
16
kono
parents: 14
diff changeset
323 if (wrote_arg)
kono
parents: 14
diff changeset
324 {
kono
parents: 14
diff changeset
325 pp_comma (pp);
kono
parents: 14
diff changeset
326 pp_space (pp);
kono
parents: 14
diff changeset
327 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
328 wrote_arg = true;
16
kono
parents: 14
diff changeset
329 dump_generic_node (pp, TREE_VALUE (arg), spc, flags, false);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
330 arg = TREE_CHAIN (arg);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
331 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
332
16
kono
parents: 14
diff changeset
333 /* Drop the trailing void_type_node if we had any previous argument. */
kono
parents: 14
diff changeset
334 if (arg == void_list_node && !wrote_arg)
kono
parents: 14
diff changeset
335 pp_string (pp, "void");
kono
parents: 14
diff changeset
336 /* Properly dump vararg function types. */
kono
parents: 14
diff changeset
337 else if (!arg && wrote_arg)
kono
parents: 14
diff changeset
338 pp_string (pp, ", ...");
kono
parents: 14
diff changeset
339 /* Avoid printing any arg for unprototyped functions. */
kono
parents: 14
diff changeset
340
kono
parents: 14
diff changeset
341 pp_right_paren (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
342 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
343
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
344 /* Dump the domain associated with an array. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
345
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
346 static void
16
kono
parents: 14
diff changeset
347 dump_array_domain (pretty_printer *pp, tree domain, int spc, dump_flags_t flags)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
348 {
16
kono
parents: 14
diff changeset
349 pp_left_bracket (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
350 if (domain)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
351 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
352 tree min = TYPE_MIN_VALUE (domain);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
353 tree max = TYPE_MAX_VALUE (domain);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
354
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
355 if (min && max
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
356 && integer_zerop (min)
16
kono
parents: 14
diff changeset
357 && tree_fits_shwi_p (max))
kono
parents: 14
diff changeset
358 pp_wide_integer (pp, tree_to_shwi (max) + 1);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
360 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
361 if (min)
16
kono
parents: 14
diff changeset
362 dump_generic_node (pp, min, spc, flags, false);
kono
parents: 14
diff changeset
363 pp_colon (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
364 if (max)
16
kono
parents: 14
diff changeset
365 dump_generic_node (pp, max, spc, flags, false);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
366 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
367 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
368 else
16
kono
parents: 14
diff changeset
369 pp_string (pp, "<unknown>");
kono
parents: 14
diff changeset
370 pp_right_bracket (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
371 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
372
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
373
16
kono
parents: 14
diff changeset
374 /* Dump OpenMP clause CLAUSE. PP, CLAUSE, SPC and FLAGS are as in
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
375 dump_generic_node. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
376
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
377 static void
16
kono
parents: 14
diff changeset
378 dump_omp_clause (pretty_printer *pp, tree clause, int spc, dump_flags_t flags)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
379 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
380 const char *name;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
381
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
382 switch (OMP_CLAUSE_CODE (clause))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
383 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
384 case OMP_CLAUSE_PRIVATE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
385 name = "private";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
386 goto print_remap;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
387 case OMP_CLAUSE_SHARED:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
388 name = "shared";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
389 goto print_remap;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
390 case OMP_CLAUSE_FIRSTPRIVATE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
391 name = "firstprivate";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
392 goto print_remap;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
393 case OMP_CLAUSE_LASTPRIVATE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
394 name = "lastprivate";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
395 goto print_remap;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
396 case OMP_CLAUSE_COPYIN:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
397 name = "copyin";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
398 goto print_remap;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
399 case OMP_CLAUSE_COPYPRIVATE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
400 name = "copyprivate";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
401 goto print_remap;
16
kono
parents: 14
diff changeset
402 case OMP_CLAUSE_UNIFORM:
kono
parents: 14
diff changeset
403 name = "uniform";
kono
parents: 14
diff changeset
404 goto print_remap;
kono
parents: 14
diff changeset
405 case OMP_CLAUSE_USE_DEVICE_PTR:
kono
parents: 14
diff changeset
406 name = "use_device_ptr";
kono
parents: 14
diff changeset
407 goto print_remap;
kono
parents: 14
diff changeset
408 case OMP_CLAUSE_IS_DEVICE_PTR:
kono
parents: 14
diff changeset
409 name = "is_device_ptr";
kono
parents: 14
diff changeset
410 goto print_remap;
kono
parents: 14
diff changeset
411 case OMP_CLAUSE__LOOPTEMP_:
kono
parents: 14
diff changeset
412 name = "_looptemp_";
kono
parents: 14
diff changeset
413 goto print_remap;
kono
parents: 14
diff changeset
414 case OMP_CLAUSE_TO_DECLARE:
kono
parents: 14
diff changeset
415 name = "to";
kono
parents: 14
diff changeset
416 goto print_remap;
kono
parents: 14
diff changeset
417 case OMP_CLAUSE_LINK:
kono
parents: 14
diff changeset
418 name = "link";
kono
parents: 14
diff changeset
419 goto print_remap;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
420 print_remap:
16
kono
parents: 14
diff changeset
421 pp_string (pp, name);
kono
parents: 14
diff changeset
422 pp_left_paren (pp);
kono
parents: 14
diff changeset
423 dump_generic_node (pp, OMP_CLAUSE_DECL (clause),
kono
parents: 14
diff changeset
424 spc, flags, false);
kono
parents: 14
diff changeset
425 pp_right_paren (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
426 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
427
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
428 case OMP_CLAUSE_REDUCTION:
16
kono
parents: 14
diff changeset
429 pp_string (pp, "reduction(");
kono
parents: 14
diff changeset
430 if (OMP_CLAUSE_REDUCTION_CODE (clause) != ERROR_MARK)
kono
parents: 14
diff changeset
431 {
kono
parents: 14
diff changeset
432 pp_string (pp,
kono
parents: 14
diff changeset
433 op_symbol_code (OMP_CLAUSE_REDUCTION_CODE (clause)));
kono
parents: 14
diff changeset
434 pp_colon (pp);
kono
parents: 14
diff changeset
435 }
kono
parents: 14
diff changeset
436 dump_generic_node (pp, OMP_CLAUSE_DECL (clause),
kono
parents: 14
diff changeset
437 spc, flags, false);
kono
parents: 14
diff changeset
438 pp_right_paren (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
439 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
440
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
441 case OMP_CLAUSE_IF:
16
kono
parents: 14
diff changeset
442 pp_string (pp, "if(");
kono
parents: 14
diff changeset
443 switch (OMP_CLAUSE_IF_MODIFIER (clause))
kono
parents: 14
diff changeset
444 {
kono
parents: 14
diff changeset
445 case ERROR_MARK: break;
kono
parents: 14
diff changeset
446 case OMP_PARALLEL: pp_string (pp, "parallel:"); break;
kono
parents: 14
diff changeset
447 case OMP_TASK: pp_string (pp, "task:"); break;
kono
parents: 14
diff changeset
448 case OMP_TASKLOOP: pp_string (pp, "taskloop:"); break;
kono
parents: 14
diff changeset
449 case OMP_TARGET_DATA: pp_string (pp, "target data:"); break;
kono
parents: 14
diff changeset
450 case OMP_TARGET: pp_string (pp, "target:"); break;
kono
parents: 14
diff changeset
451 case OMP_TARGET_UPDATE: pp_string (pp, "target update:"); break;
kono
parents: 14
diff changeset
452 case OMP_TARGET_ENTER_DATA:
kono
parents: 14
diff changeset
453 pp_string (pp, "target enter data:"); break;
kono
parents: 14
diff changeset
454 case OMP_TARGET_EXIT_DATA: pp_string (pp, "target exit data:"); break;
kono
parents: 14
diff changeset
455 default: gcc_unreachable ();
kono
parents: 14
diff changeset
456 }
kono
parents: 14
diff changeset
457 dump_generic_node (pp, OMP_CLAUSE_IF_EXPR (clause),
kono
parents: 14
diff changeset
458 spc, flags, false);
kono
parents: 14
diff changeset
459 pp_right_paren (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
460 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
461
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
462 case OMP_CLAUSE_NUM_THREADS:
16
kono
parents: 14
diff changeset
463 pp_string (pp, "num_threads(");
kono
parents: 14
diff changeset
464 dump_generic_node (pp, OMP_CLAUSE_NUM_THREADS_EXPR (clause),
kono
parents: 14
diff changeset
465 spc, flags, false);
kono
parents: 14
diff changeset
466 pp_right_paren (pp);
kono
parents: 14
diff changeset
467 break;
kono
parents: 14
diff changeset
468
kono
parents: 14
diff changeset
469 case OMP_CLAUSE__CILK_FOR_COUNT_:
kono
parents: 14
diff changeset
470 pp_string (pp, "_Cilk_for_count_(");
kono
parents: 14
diff changeset
471 dump_generic_node (pp, OMP_CLAUSE_OPERAND (clause, 0),
kono
parents: 14
diff changeset
472 spc, flags, false);
kono
parents: 14
diff changeset
473 pp_right_paren (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
474 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
475
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
476 case OMP_CLAUSE_NOWAIT:
16
kono
parents: 14
diff changeset
477 pp_string (pp, "nowait");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
478 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
479 case OMP_CLAUSE_ORDERED:
16
kono
parents: 14
diff changeset
480 pp_string (pp, "ordered");
kono
parents: 14
diff changeset
481 if (OMP_CLAUSE_ORDERED_EXPR (clause))
kono
parents: 14
diff changeset
482 {
kono
parents: 14
diff changeset
483 pp_left_paren (pp);
kono
parents: 14
diff changeset
484 dump_generic_node (pp, OMP_CLAUSE_ORDERED_EXPR (clause),
kono
parents: 14
diff changeset
485 spc, flags, false);
kono
parents: 14
diff changeset
486 pp_right_paren (pp);
kono
parents: 14
diff changeset
487 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
488 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
489
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
490 case OMP_CLAUSE_DEFAULT:
16
kono
parents: 14
diff changeset
491 pp_string (pp, "default(");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
492 switch (OMP_CLAUSE_DEFAULT_KIND (clause))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
493 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
494 case OMP_CLAUSE_DEFAULT_UNSPECIFIED:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
495 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
496 case OMP_CLAUSE_DEFAULT_SHARED:
16
kono
parents: 14
diff changeset
497 pp_string (pp, "shared");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
498 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
499 case OMP_CLAUSE_DEFAULT_NONE:
16
kono
parents: 14
diff changeset
500 pp_string (pp, "none");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
501 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
502 case OMP_CLAUSE_DEFAULT_PRIVATE:
16
kono
parents: 14
diff changeset
503 pp_string (pp, "private");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
504 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
505 case OMP_CLAUSE_DEFAULT_FIRSTPRIVATE:
16
kono
parents: 14
diff changeset
506 pp_string (pp, "firstprivate");
kono
parents: 14
diff changeset
507 break;
kono
parents: 14
diff changeset
508 case OMP_CLAUSE_DEFAULT_PRESENT:
kono
parents: 14
diff changeset
509 pp_string (pp, "present");
kono
parents: 14
diff changeset
510 break;
kono
parents: 14
diff changeset
511 default:
kono
parents: 14
diff changeset
512 gcc_unreachable ();
kono
parents: 14
diff changeset
513 }
kono
parents: 14
diff changeset
514 pp_right_paren (pp);
kono
parents: 14
diff changeset
515 break;
kono
parents: 14
diff changeset
516
kono
parents: 14
diff changeset
517 case OMP_CLAUSE_SCHEDULE:
kono
parents: 14
diff changeset
518 pp_string (pp, "schedule(");
kono
parents: 14
diff changeset
519 if (OMP_CLAUSE_SCHEDULE_KIND (clause)
kono
parents: 14
diff changeset
520 & (OMP_CLAUSE_SCHEDULE_MONOTONIC
kono
parents: 14
diff changeset
521 | OMP_CLAUSE_SCHEDULE_NONMONOTONIC))
kono
parents: 14
diff changeset
522 {
kono
parents: 14
diff changeset
523 if (OMP_CLAUSE_SCHEDULE_KIND (clause)
kono
parents: 14
diff changeset
524 & OMP_CLAUSE_SCHEDULE_MONOTONIC)
kono
parents: 14
diff changeset
525 pp_string (pp, "monotonic");
kono
parents: 14
diff changeset
526 else
kono
parents: 14
diff changeset
527 pp_string (pp, "nonmonotonic");
kono
parents: 14
diff changeset
528 if (OMP_CLAUSE_SCHEDULE_SIMD (clause))
kono
parents: 14
diff changeset
529 pp_comma (pp);
kono
parents: 14
diff changeset
530 else
kono
parents: 14
diff changeset
531 pp_colon (pp);
kono
parents: 14
diff changeset
532 }
kono
parents: 14
diff changeset
533 if (OMP_CLAUSE_SCHEDULE_SIMD (clause))
kono
parents: 14
diff changeset
534 pp_string (pp, "simd:");
kono
parents: 14
diff changeset
535
kono
parents: 14
diff changeset
536 switch (OMP_CLAUSE_SCHEDULE_KIND (clause) & OMP_CLAUSE_SCHEDULE_MASK)
kono
parents: 14
diff changeset
537 {
kono
parents: 14
diff changeset
538 case OMP_CLAUSE_SCHEDULE_STATIC:
kono
parents: 14
diff changeset
539 pp_string (pp, "static");
kono
parents: 14
diff changeset
540 break;
kono
parents: 14
diff changeset
541 case OMP_CLAUSE_SCHEDULE_DYNAMIC:
kono
parents: 14
diff changeset
542 pp_string (pp, "dynamic");
kono
parents: 14
diff changeset
543 break;
kono
parents: 14
diff changeset
544 case OMP_CLAUSE_SCHEDULE_GUIDED:
kono
parents: 14
diff changeset
545 pp_string (pp, "guided");
kono
parents: 14
diff changeset
546 break;
kono
parents: 14
diff changeset
547 case OMP_CLAUSE_SCHEDULE_RUNTIME:
kono
parents: 14
diff changeset
548 pp_string (pp, "runtime");
kono
parents: 14
diff changeset
549 break;
kono
parents: 14
diff changeset
550 case OMP_CLAUSE_SCHEDULE_AUTO:
kono
parents: 14
diff changeset
551 pp_string (pp, "auto");
kono
parents: 14
diff changeset
552 break;
kono
parents: 14
diff changeset
553 case OMP_CLAUSE_SCHEDULE_CILKFOR:
kono
parents: 14
diff changeset
554 pp_string (pp, "cilk-for grain");
kono
parents: 14
diff changeset
555 break;
kono
parents: 14
diff changeset
556 default:
kono
parents: 14
diff changeset
557 gcc_unreachable ();
kono
parents: 14
diff changeset
558 }
kono
parents: 14
diff changeset
559 if (OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (clause))
kono
parents: 14
diff changeset
560 {
kono
parents: 14
diff changeset
561 pp_comma (pp);
kono
parents: 14
diff changeset
562 dump_generic_node (pp, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (clause),
kono
parents: 14
diff changeset
563 spc, flags, false);
kono
parents: 14
diff changeset
564 }
kono
parents: 14
diff changeset
565 pp_right_paren (pp);
kono
parents: 14
diff changeset
566 break;
kono
parents: 14
diff changeset
567
kono
parents: 14
diff changeset
568 case OMP_CLAUSE_UNTIED:
kono
parents: 14
diff changeset
569 pp_string (pp, "untied");
kono
parents: 14
diff changeset
570 break;
kono
parents: 14
diff changeset
571
kono
parents: 14
diff changeset
572 case OMP_CLAUSE_COLLAPSE:
kono
parents: 14
diff changeset
573 pp_string (pp, "collapse(");
kono
parents: 14
diff changeset
574 dump_generic_node (pp, OMP_CLAUSE_COLLAPSE_EXPR (clause),
kono
parents: 14
diff changeset
575 spc, flags, false);
kono
parents: 14
diff changeset
576 pp_right_paren (pp);
kono
parents: 14
diff changeset
577 break;
kono
parents: 14
diff changeset
578
kono
parents: 14
diff changeset
579 case OMP_CLAUSE_FINAL:
kono
parents: 14
diff changeset
580 pp_string (pp, "final(");
kono
parents: 14
diff changeset
581 dump_generic_node (pp, OMP_CLAUSE_FINAL_EXPR (clause),
kono
parents: 14
diff changeset
582 spc, flags, false);
kono
parents: 14
diff changeset
583 pp_right_paren (pp);
kono
parents: 14
diff changeset
584 break;
kono
parents: 14
diff changeset
585
kono
parents: 14
diff changeset
586 case OMP_CLAUSE_MERGEABLE:
kono
parents: 14
diff changeset
587 pp_string (pp, "mergeable");
kono
parents: 14
diff changeset
588 break;
kono
parents: 14
diff changeset
589
kono
parents: 14
diff changeset
590 case OMP_CLAUSE_LINEAR:
kono
parents: 14
diff changeset
591 pp_string (pp, "linear(");
kono
parents: 14
diff changeset
592 switch (OMP_CLAUSE_LINEAR_KIND (clause))
kono
parents: 14
diff changeset
593 {
kono
parents: 14
diff changeset
594 case OMP_CLAUSE_LINEAR_DEFAULT:
kono
parents: 14
diff changeset
595 break;
kono
parents: 14
diff changeset
596 case OMP_CLAUSE_LINEAR_REF:
kono
parents: 14
diff changeset
597 pp_string (pp, "ref(");
kono
parents: 14
diff changeset
598 break;
kono
parents: 14
diff changeset
599 case OMP_CLAUSE_LINEAR_VAL:
kono
parents: 14
diff changeset
600 pp_string (pp, "val(");
kono
parents: 14
diff changeset
601 break;
kono
parents: 14
diff changeset
602 case OMP_CLAUSE_LINEAR_UVAL:
kono
parents: 14
diff changeset
603 pp_string (pp, "uval(");
kono
parents: 14
diff changeset
604 break;
kono
parents: 14
diff changeset
605 default:
kono
parents: 14
diff changeset
606 gcc_unreachable ();
kono
parents: 14
diff changeset
607 }
kono
parents: 14
diff changeset
608 dump_generic_node (pp, OMP_CLAUSE_DECL (clause),
kono
parents: 14
diff changeset
609 spc, flags, false);
kono
parents: 14
diff changeset
610 if (OMP_CLAUSE_LINEAR_KIND (clause) != OMP_CLAUSE_LINEAR_DEFAULT)
kono
parents: 14
diff changeset
611 pp_right_paren (pp);
kono
parents: 14
diff changeset
612 pp_colon (pp);
kono
parents: 14
diff changeset
613 dump_generic_node (pp, OMP_CLAUSE_LINEAR_STEP (clause),
kono
parents: 14
diff changeset
614 spc, flags, false);
kono
parents: 14
diff changeset
615 pp_right_paren (pp);
kono
parents: 14
diff changeset
616 break;
kono
parents: 14
diff changeset
617
kono
parents: 14
diff changeset
618 case OMP_CLAUSE_ALIGNED:
kono
parents: 14
diff changeset
619 pp_string (pp, "aligned(");
kono
parents: 14
diff changeset
620 dump_generic_node (pp, OMP_CLAUSE_DECL (clause),
kono
parents: 14
diff changeset
621 spc, flags, false);
kono
parents: 14
diff changeset
622 if (OMP_CLAUSE_ALIGNED_ALIGNMENT (clause))
kono
parents: 14
diff changeset
623 {
kono
parents: 14
diff changeset
624 pp_colon (pp);
kono
parents: 14
diff changeset
625 dump_generic_node (pp, OMP_CLAUSE_ALIGNED_ALIGNMENT (clause),
kono
parents: 14
diff changeset
626 spc, flags, false);
kono
parents: 14
diff changeset
627 }
kono
parents: 14
diff changeset
628 pp_right_paren (pp);
kono
parents: 14
diff changeset
629 break;
kono
parents: 14
diff changeset
630
kono
parents: 14
diff changeset
631 case OMP_CLAUSE_DEPEND:
kono
parents: 14
diff changeset
632 pp_string (pp, "depend(");
kono
parents: 14
diff changeset
633 switch (OMP_CLAUSE_DEPEND_KIND (clause))
kono
parents: 14
diff changeset
634 {
kono
parents: 14
diff changeset
635 case OMP_CLAUSE_DEPEND_IN:
kono
parents: 14
diff changeset
636 pp_string (pp, "in");
kono
parents: 14
diff changeset
637 break;
kono
parents: 14
diff changeset
638 case OMP_CLAUSE_DEPEND_OUT:
kono
parents: 14
diff changeset
639 pp_string (pp, "out");
kono
parents: 14
diff changeset
640 break;
kono
parents: 14
diff changeset
641 case OMP_CLAUSE_DEPEND_INOUT:
kono
parents: 14
diff changeset
642 pp_string (pp, "inout");
kono
parents: 14
diff changeset
643 break;
kono
parents: 14
diff changeset
644 case OMP_CLAUSE_DEPEND_SOURCE:
kono
parents: 14
diff changeset
645 pp_string (pp, "source)");
kono
parents: 14
diff changeset
646 return;
kono
parents: 14
diff changeset
647 case OMP_CLAUSE_DEPEND_SINK:
kono
parents: 14
diff changeset
648 pp_string (pp, "sink:");
kono
parents: 14
diff changeset
649 for (tree t = OMP_CLAUSE_DECL (clause); t; t = TREE_CHAIN (t))
kono
parents: 14
diff changeset
650 if (TREE_CODE (t) == TREE_LIST)
kono
parents: 14
diff changeset
651 {
kono
parents: 14
diff changeset
652 dump_generic_node (pp, TREE_VALUE (t), spc, flags, false);
kono
parents: 14
diff changeset
653 if (TREE_PURPOSE (t) != integer_zero_node)
kono
parents: 14
diff changeset
654 {
kono
parents: 14
diff changeset
655 if (OMP_CLAUSE_DEPEND_SINK_NEGATIVE (t))
kono
parents: 14
diff changeset
656 pp_minus (pp);
kono
parents: 14
diff changeset
657 else
kono
parents: 14
diff changeset
658 pp_plus (pp);
kono
parents: 14
diff changeset
659 dump_generic_node (pp, TREE_PURPOSE (t), spc, flags,
kono
parents: 14
diff changeset
660 false);
kono
parents: 14
diff changeset
661 }
kono
parents: 14
diff changeset
662 if (TREE_CHAIN (t))
kono
parents: 14
diff changeset
663 pp_comma (pp);
kono
parents: 14
diff changeset
664 }
kono
parents: 14
diff changeset
665 else
kono
parents: 14
diff changeset
666 gcc_unreachable ();
kono
parents: 14
diff changeset
667 pp_right_paren (pp);
kono
parents: 14
diff changeset
668 return;
kono
parents: 14
diff changeset
669 default:
kono
parents: 14
diff changeset
670 gcc_unreachable ();
kono
parents: 14
diff changeset
671 }
kono
parents: 14
diff changeset
672 pp_colon (pp);
kono
parents: 14
diff changeset
673 dump_generic_node (pp, OMP_CLAUSE_DECL (clause),
kono
parents: 14
diff changeset
674 spc, flags, false);
kono
parents: 14
diff changeset
675 pp_right_paren (pp);
kono
parents: 14
diff changeset
676 break;
kono
parents: 14
diff changeset
677
kono
parents: 14
diff changeset
678 case OMP_CLAUSE_MAP:
kono
parents: 14
diff changeset
679 pp_string (pp, "map(");
kono
parents: 14
diff changeset
680 switch (OMP_CLAUSE_MAP_KIND (clause))
kono
parents: 14
diff changeset
681 {
kono
parents: 14
diff changeset
682 case GOMP_MAP_ALLOC:
kono
parents: 14
diff changeset
683 case GOMP_MAP_POINTER:
kono
parents: 14
diff changeset
684 pp_string (pp, "alloc");
kono
parents: 14
diff changeset
685 break;
kono
parents: 14
diff changeset
686 case GOMP_MAP_TO:
kono
parents: 14
diff changeset
687 case GOMP_MAP_TO_PSET:
kono
parents: 14
diff changeset
688 pp_string (pp, "to");
kono
parents: 14
diff changeset
689 break;
kono
parents: 14
diff changeset
690 case GOMP_MAP_FROM:
kono
parents: 14
diff changeset
691 pp_string (pp, "from");
kono
parents: 14
diff changeset
692 break;
kono
parents: 14
diff changeset
693 case GOMP_MAP_TOFROM:
kono
parents: 14
diff changeset
694 pp_string (pp, "tofrom");
kono
parents: 14
diff changeset
695 break;
kono
parents: 14
diff changeset
696 case GOMP_MAP_FORCE_ALLOC:
kono
parents: 14
diff changeset
697 pp_string (pp, "force_alloc");
kono
parents: 14
diff changeset
698 break;
kono
parents: 14
diff changeset
699 case GOMP_MAP_FORCE_TO:
kono
parents: 14
diff changeset
700 pp_string (pp, "force_to");
kono
parents: 14
diff changeset
701 break;
kono
parents: 14
diff changeset
702 case GOMP_MAP_FORCE_FROM:
kono
parents: 14
diff changeset
703 pp_string (pp, "force_from");
kono
parents: 14
diff changeset
704 break;
kono
parents: 14
diff changeset
705 case GOMP_MAP_FORCE_TOFROM:
kono
parents: 14
diff changeset
706 pp_string (pp, "force_tofrom");
kono
parents: 14
diff changeset
707 break;
kono
parents: 14
diff changeset
708 case GOMP_MAP_FORCE_PRESENT:
kono
parents: 14
diff changeset
709 pp_string (pp, "force_present");
kono
parents: 14
diff changeset
710 break;
kono
parents: 14
diff changeset
711 case GOMP_MAP_DELETE:
kono
parents: 14
diff changeset
712 pp_string (pp, "delete");
kono
parents: 14
diff changeset
713 break;
kono
parents: 14
diff changeset
714 case GOMP_MAP_FORCE_DEVICEPTR:
kono
parents: 14
diff changeset
715 pp_string (pp, "force_deviceptr");
kono
parents: 14
diff changeset
716 break;
kono
parents: 14
diff changeset
717 case GOMP_MAP_ALWAYS_TO:
kono
parents: 14
diff changeset
718 pp_string (pp, "always,to");
kono
parents: 14
diff changeset
719 break;
kono
parents: 14
diff changeset
720 case GOMP_MAP_ALWAYS_FROM:
kono
parents: 14
diff changeset
721 pp_string (pp, "always,from");
kono
parents: 14
diff changeset
722 break;
kono
parents: 14
diff changeset
723 case GOMP_MAP_ALWAYS_TOFROM:
kono
parents: 14
diff changeset
724 pp_string (pp, "always,tofrom");
kono
parents: 14
diff changeset
725 break;
kono
parents: 14
diff changeset
726 case GOMP_MAP_RELEASE:
kono
parents: 14
diff changeset
727 pp_string (pp, "release");
kono
parents: 14
diff changeset
728 break;
kono
parents: 14
diff changeset
729 case GOMP_MAP_FIRSTPRIVATE_POINTER:
kono
parents: 14
diff changeset
730 pp_string (pp, "firstprivate");
kono
parents: 14
diff changeset
731 break;
kono
parents: 14
diff changeset
732 case GOMP_MAP_FIRSTPRIVATE_REFERENCE:
kono
parents: 14
diff changeset
733 pp_string (pp, "firstprivate ref");
kono
parents: 14
diff changeset
734 break;
kono
parents: 14
diff changeset
735 case GOMP_MAP_STRUCT:
kono
parents: 14
diff changeset
736 pp_string (pp, "struct");
kono
parents: 14
diff changeset
737 break;
kono
parents: 14
diff changeset
738 case GOMP_MAP_ALWAYS_POINTER:
kono
parents: 14
diff changeset
739 pp_string (pp, "always_pointer");
kono
parents: 14
diff changeset
740 break;
kono
parents: 14
diff changeset
741 case GOMP_MAP_DEVICE_RESIDENT:
kono
parents: 14
diff changeset
742 pp_string (pp, "device_resident");
kono
parents: 14
diff changeset
743 break;
kono
parents: 14
diff changeset
744 case GOMP_MAP_LINK:
kono
parents: 14
diff changeset
745 pp_string (pp, "link");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
746 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
747 default:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
748 gcc_unreachable ();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
749 }
16
kono
parents: 14
diff changeset
750 pp_colon (pp);
kono
parents: 14
diff changeset
751 dump_generic_node (pp, OMP_CLAUSE_DECL (clause),
kono
parents: 14
diff changeset
752 spc, flags, false);
kono
parents: 14
diff changeset
753 print_clause_size:
kono
parents: 14
diff changeset
754 if (OMP_CLAUSE_SIZE (clause))
kono
parents: 14
diff changeset
755 {
kono
parents: 14
diff changeset
756 switch (OMP_CLAUSE_CODE (clause) == OMP_CLAUSE_MAP
kono
parents: 14
diff changeset
757 ? OMP_CLAUSE_MAP_KIND (clause) : GOMP_MAP_TO)
kono
parents: 14
diff changeset
758 {
kono
parents: 14
diff changeset
759 case GOMP_MAP_POINTER:
kono
parents: 14
diff changeset
760 case GOMP_MAP_FIRSTPRIVATE_POINTER:
kono
parents: 14
diff changeset
761 case GOMP_MAP_FIRSTPRIVATE_REFERENCE:
kono
parents: 14
diff changeset
762 case GOMP_MAP_ALWAYS_POINTER:
kono
parents: 14
diff changeset
763 pp_string (pp, " [pointer assign, bias: ");
kono
parents: 14
diff changeset
764 break;
kono
parents: 14
diff changeset
765 case GOMP_MAP_TO_PSET:
kono
parents: 14
diff changeset
766 pp_string (pp, " [pointer set, len: ");
kono
parents: 14
diff changeset
767 break;
kono
parents: 14
diff changeset
768 default:
kono
parents: 14
diff changeset
769 pp_string (pp, " [len: ");
kono
parents: 14
diff changeset
770 break;
kono
parents: 14
diff changeset
771 }
kono
parents: 14
diff changeset
772 dump_generic_node (pp, OMP_CLAUSE_SIZE (clause),
kono
parents: 14
diff changeset
773 spc, flags, false);
kono
parents: 14
diff changeset
774 pp_right_bracket (pp);
kono
parents: 14
diff changeset
775 }
kono
parents: 14
diff changeset
776 pp_right_paren (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
777 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
778
16
kono
parents: 14
diff changeset
779 case OMP_CLAUSE_FROM:
kono
parents: 14
diff changeset
780 pp_string (pp, "from(");
kono
parents: 14
diff changeset
781 dump_generic_node (pp, OMP_CLAUSE_DECL (clause),
kono
parents: 14
diff changeset
782 spc, flags, false);
kono
parents: 14
diff changeset
783 goto print_clause_size;
kono
parents: 14
diff changeset
784
kono
parents: 14
diff changeset
785 case OMP_CLAUSE_TO:
kono
parents: 14
diff changeset
786 pp_string (pp, "to(");
kono
parents: 14
diff changeset
787 dump_generic_node (pp, OMP_CLAUSE_DECL (clause),
kono
parents: 14
diff changeset
788 spc, flags, false);
kono
parents: 14
diff changeset
789 goto print_clause_size;
kono
parents: 14
diff changeset
790
kono
parents: 14
diff changeset
791 case OMP_CLAUSE__CACHE_:
kono
parents: 14
diff changeset
792 pp_string (pp, "(");
kono
parents: 14
diff changeset
793 dump_generic_node (pp, OMP_CLAUSE_DECL (clause),
kono
parents: 14
diff changeset
794 spc, flags, false);
kono
parents: 14
diff changeset
795 goto print_clause_size;
kono
parents: 14
diff changeset
796
kono
parents: 14
diff changeset
797 case OMP_CLAUSE_NUM_TEAMS:
kono
parents: 14
diff changeset
798 pp_string (pp, "num_teams(");
kono
parents: 14
diff changeset
799 dump_generic_node (pp, OMP_CLAUSE_NUM_TEAMS_EXPR (clause),
kono
parents: 14
diff changeset
800 spc, flags, false);
kono
parents: 14
diff changeset
801 pp_right_paren (pp);
kono
parents: 14
diff changeset
802 break;
kono
parents: 14
diff changeset
803
kono
parents: 14
diff changeset
804 case OMP_CLAUSE_THREAD_LIMIT:
kono
parents: 14
diff changeset
805 pp_string (pp, "thread_limit(");
kono
parents: 14
diff changeset
806 dump_generic_node (pp, OMP_CLAUSE_THREAD_LIMIT_EXPR (clause),
kono
parents: 14
diff changeset
807 spc, flags, false);
kono
parents: 14
diff changeset
808 pp_right_paren (pp);
kono
parents: 14
diff changeset
809 break;
kono
parents: 14
diff changeset
810
kono
parents: 14
diff changeset
811 case OMP_CLAUSE_DEVICE:
kono
parents: 14
diff changeset
812 pp_string (pp, "device(");
kono
parents: 14
diff changeset
813 dump_generic_node (pp, OMP_CLAUSE_DEVICE_ID (clause),
kono
parents: 14
diff changeset
814 spc, flags, false);
kono
parents: 14
diff changeset
815 pp_right_paren (pp);
kono
parents: 14
diff changeset
816 break;
kono
parents: 14
diff changeset
817
kono
parents: 14
diff changeset
818 case OMP_CLAUSE_DIST_SCHEDULE:
kono
parents: 14
diff changeset
819 pp_string (pp, "dist_schedule(static");
kono
parents: 14
diff changeset
820 if (OMP_CLAUSE_DIST_SCHEDULE_CHUNK_EXPR (clause))
kono
parents: 14
diff changeset
821 {
kono
parents: 14
diff changeset
822 pp_comma (pp);
kono
parents: 14
diff changeset
823 dump_generic_node (pp,
kono
parents: 14
diff changeset
824 OMP_CLAUSE_DIST_SCHEDULE_CHUNK_EXPR (clause),
kono
parents: 14
diff changeset
825 spc, flags, false);
kono
parents: 14
diff changeset
826 }
kono
parents: 14
diff changeset
827 pp_right_paren (pp);
kono
parents: 14
diff changeset
828 break;
kono
parents: 14
diff changeset
829
kono
parents: 14
diff changeset
830 case OMP_CLAUSE_PROC_BIND:
kono
parents: 14
diff changeset
831 pp_string (pp, "proc_bind(");
kono
parents: 14
diff changeset
832 switch (OMP_CLAUSE_PROC_BIND_KIND (clause))
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
833 {
16
kono
parents: 14
diff changeset
834 case OMP_CLAUSE_PROC_BIND_MASTER:
kono
parents: 14
diff changeset
835 pp_string (pp, "master");
kono
parents: 14
diff changeset
836 break;
kono
parents: 14
diff changeset
837 case OMP_CLAUSE_PROC_BIND_CLOSE:
kono
parents: 14
diff changeset
838 pp_string (pp, "close");
kono
parents: 14
diff changeset
839 break;
kono
parents: 14
diff changeset
840 case OMP_CLAUSE_PROC_BIND_SPREAD:
kono
parents: 14
diff changeset
841 pp_string (pp, "spread");
kono
parents: 14
diff changeset
842 break;
kono
parents: 14
diff changeset
843 default:
kono
parents: 14
diff changeset
844 gcc_unreachable ();
kono
parents: 14
diff changeset
845 }
kono
parents: 14
diff changeset
846 pp_right_paren (pp);
kono
parents: 14
diff changeset
847 break;
kono
parents: 14
diff changeset
848
kono
parents: 14
diff changeset
849 case OMP_CLAUSE_SAFELEN:
kono
parents: 14
diff changeset
850 pp_string (pp, "safelen(");
kono
parents: 14
diff changeset
851 dump_generic_node (pp, OMP_CLAUSE_SAFELEN_EXPR (clause),
kono
parents: 14
diff changeset
852 spc, flags, false);
kono
parents: 14
diff changeset
853 pp_right_paren (pp);
kono
parents: 14
diff changeset
854 break;
kono
parents: 14
diff changeset
855
kono
parents: 14
diff changeset
856 case OMP_CLAUSE_SIMDLEN:
kono
parents: 14
diff changeset
857 pp_string (pp, "simdlen(");
kono
parents: 14
diff changeset
858 dump_generic_node (pp, OMP_CLAUSE_SIMDLEN_EXPR (clause),
kono
parents: 14
diff changeset
859 spc, flags, false);
kono
parents: 14
diff changeset
860 pp_right_paren (pp);
kono
parents: 14
diff changeset
861 break;
kono
parents: 14
diff changeset
862
kono
parents: 14
diff changeset
863 case OMP_CLAUSE_PRIORITY:
kono
parents: 14
diff changeset
864 pp_string (pp, "priority(");
kono
parents: 14
diff changeset
865 dump_generic_node (pp, OMP_CLAUSE_PRIORITY_EXPR (clause),
kono
parents: 14
diff changeset
866 spc, flags, false);
kono
parents: 14
diff changeset
867 pp_right_paren (pp);
kono
parents: 14
diff changeset
868 break;
kono
parents: 14
diff changeset
869
kono
parents: 14
diff changeset
870 case OMP_CLAUSE_GRAINSIZE:
kono
parents: 14
diff changeset
871 pp_string (pp, "grainsize(");
kono
parents: 14
diff changeset
872 dump_generic_node (pp, OMP_CLAUSE_GRAINSIZE_EXPR (clause),
kono
parents: 14
diff changeset
873 spc, flags, false);
kono
parents: 14
diff changeset
874 pp_right_paren (pp);
kono
parents: 14
diff changeset
875 break;
kono
parents: 14
diff changeset
876
kono
parents: 14
diff changeset
877 case OMP_CLAUSE_NUM_TASKS:
kono
parents: 14
diff changeset
878 pp_string (pp, "num_tasks(");
kono
parents: 14
diff changeset
879 dump_generic_node (pp, OMP_CLAUSE_NUM_TASKS_EXPR (clause),
kono
parents: 14
diff changeset
880 spc, flags, false);
kono
parents: 14
diff changeset
881 pp_right_paren (pp);
kono
parents: 14
diff changeset
882 break;
kono
parents: 14
diff changeset
883
kono
parents: 14
diff changeset
884 case OMP_CLAUSE_HINT:
kono
parents: 14
diff changeset
885 pp_string (pp, "hint(");
kono
parents: 14
diff changeset
886 dump_generic_node (pp, OMP_CLAUSE_HINT_EXPR (clause),
kono
parents: 14
diff changeset
887 spc, flags, false);
kono
parents: 14
diff changeset
888 pp_right_paren (pp);
kono
parents: 14
diff changeset
889 break;
kono
parents: 14
diff changeset
890
kono
parents: 14
diff changeset
891 case OMP_CLAUSE_DEFAULTMAP:
kono
parents: 14
diff changeset
892 pp_string (pp, "defaultmap(tofrom:scalar)");
kono
parents: 14
diff changeset
893 break;
kono
parents: 14
diff changeset
894
kono
parents: 14
diff changeset
895 case OMP_CLAUSE__SIMDUID_:
kono
parents: 14
diff changeset
896 pp_string (pp, "_simduid_(");
kono
parents: 14
diff changeset
897 dump_generic_node (pp, OMP_CLAUSE__SIMDUID__DECL (clause),
kono
parents: 14
diff changeset
898 spc, flags, false);
kono
parents: 14
diff changeset
899 pp_right_paren (pp);
kono
parents: 14
diff changeset
900 break;
kono
parents: 14
diff changeset
901
kono
parents: 14
diff changeset
902 case OMP_CLAUSE__SIMT_:
kono
parents: 14
diff changeset
903 pp_string (pp, "_simt_");
kono
parents: 14
diff changeset
904 break;
kono
parents: 14
diff changeset
905
kono
parents: 14
diff changeset
906 case OMP_CLAUSE_GANG:
kono
parents: 14
diff changeset
907 pp_string (pp, "gang");
kono
parents: 14
diff changeset
908 if (OMP_CLAUSE_GANG_EXPR (clause) != NULL_TREE)
kono
parents: 14
diff changeset
909 {
kono
parents: 14
diff changeset
910 pp_string (pp, "(num: ");
kono
parents: 14
diff changeset
911 dump_generic_node (pp, OMP_CLAUSE_GANG_EXPR (clause),
kono
parents: 14
diff changeset
912 spc, flags, false);
kono
parents: 14
diff changeset
913 }
kono
parents: 14
diff changeset
914 if (OMP_CLAUSE_GANG_STATIC_EXPR (clause) != NULL_TREE)
kono
parents: 14
diff changeset
915 {
kono
parents: 14
diff changeset
916 if (OMP_CLAUSE_GANG_EXPR (clause) == NULL_TREE)
kono
parents: 14
diff changeset
917 pp_left_paren (pp);
kono
parents: 14
diff changeset
918 else
kono
parents: 14
diff changeset
919 pp_space (pp);
kono
parents: 14
diff changeset
920 pp_string (pp, "static:");
kono
parents: 14
diff changeset
921 if (OMP_CLAUSE_GANG_STATIC_EXPR (clause)
kono
parents: 14
diff changeset
922 == integer_minus_one_node)
kono
parents: 14
diff changeset
923 pp_character (pp, '*');
kono
parents: 14
diff changeset
924 else
kono
parents: 14
diff changeset
925 dump_generic_node (pp, OMP_CLAUSE_GANG_STATIC_EXPR (clause),
kono
parents: 14
diff changeset
926 spc, flags, false);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
927 }
16
kono
parents: 14
diff changeset
928 if (OMP_CLAUSE_GANG_EXPR (clause) != NULL_TREE
kono
parents: 14
diff changeset
929 || OMP_CLAUSE_GANG_STATIC_EXPR (clause) != NULL_TREE)
kono
parents: 14
diff changeset
930 pp_right_paren (pp);
kono
parents: 14
diff changeset
931 break;
kono
parents: 14
diff changeset
932
kono
parents: 14
diff changeset
933 case OMP_CLAUSE_ASYNC:
kono
parents: 14
diff changeset
934 pp_string (pp, "async");
kono
parents: 14
diff changeset
935 if (OMP_CLAUSE_ASYNC_EXPR (clause))
kono
parents: 14
diff changeset
936 {
kono
parents: 14
diff changeset
937 pp_character(pp, '(');
kono
parents: 14
diff changeset
938 dump_generic_node (pp, OMP_CLAUSE_ASYNC_EXPR (clause),
kono
parents: 14
diff changeset
939 spc, flags, false);
kono
parents: 14
diff changeset
940 pp_character(pp, ')');
kono
parents: 14
diff changeset
941 }
kono
parents: 14
diff changeset
942 break;
kono
parents: 14
diff changeset
943
kono
parents: 14
diff changeset
944 case OMP_CLAUSE_AUTO:
kono
parents: 14
diff changeset
945 case OMP_CLAUSE_SEQ:
kono
parents: 14
diff changeset
946 pp_string (pp, omp_clause_code_name[OMP_CLAUSE_CODE (clause)]);
kono
parents: 14
diff changeset
947 break;
kono
parents: 14
diff changeset
948
kono
parents: 14
diff changeset
949 case OMP_CLAUSE_WAIT:
kono
parents: 14
diff changeset
950 pp_string (pp, "wait(");
kono
parents: 14
diff changeset
951 dump_generic_node (pp, OMP_CLAUSE_WAIT_EXPR (clause),
kono
parents: 14
diff changeset
952 spc, flags, false);
kono
parents: 14
diff changeset
953 pp_character(pp, ')');
kono
parents: 14
diff changeset
954 break;
kono
parents: 14
diff changeset
955
kono
parents: 14
diff changeset
956 case OMP_CLAUSE_WORKER:
kono
parents: 14
diff changeset
957 pp_string (pp, "worker");
kono
parents: 14
diff changeset
958 if (OMP_CLAUSE_WORKER_EXPR (clause) != NULL_TREE)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
959 {
16
kono
parents: 14
diff changeset
960 pp_left_paren (pp);
kono
parents: 14
diff changeset
961 dump_generic_node (pp, OMP_CLAUSE_WORKER_EXPR (clause),
kono
parents: 14
diff changeset
962 spc, flags, false);
kono
parents: 14
diff changeset
963 pp_right_paren (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
964 }
16
kono
parents: 14
diff changeset
965 break;
kono
parents: 14
diff changeset
966
kono
parents: 14
diff changeset
967 case OMP_CLAUSE_VECTOR:
kono
parents: 14
diff changeset
968 pp_string (pp, "vector");
kono
parents: 14
diff changeset
969 if (OMP_CLAUSE_VECTOR_EXPR (clause) != NULL_TREE)
kono
parents: 14
diff changeset
970 {
kono
parents: 14
diff changeset
971 pp_left_paren (pp);
kono
parents: 14
diff changeset
972 dump_generic_node (pp, OMP_CLAUSE_VECTOR_EXPR (clause),
kono
parents: 14
diff changeset
973 spc, flags, false);
kono
parents: 14
diff changeset
974 pp_right_paren (pp);
kono
parents: 14
diff changeset
975 }
kono
parents: 14
diff changeset
976 break;
kono
parents: 14
diff changeset
977
kono
parents: 14
diff changeset
978 case OMP_CLAUSE_NUM_GANGS:
kono
parents: 14
diff changeset
979 pp_string (pp, "num_gangs(");
kono
parents: 14
diff changeset
980 dump_generic_node (pp, OMP_CLAUSE_NUM_GANGS_EXPR (clause),
kono
parents: 14
diff changeset
981 spc, flags, false);
kono
parents: 14
diff changeset
982 pp_character (pp, ')');
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
983 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
984
16
kono
parents: 14
diff changeset
985 case OMP_CLAUSE_NUM_WORKERS:
kono
parents: 14
diff changeset
986 pp_string (pp, "num_workers(");
kono
parents: 14
diff changeset
987 dump_generic_node (pp, OMP_CLAUSE_NUM_WORKERS_EXPR (clause),
kono
parents: 14
diff changeset
988 spc, flags, false);
kono
parents: 14
diff changeset
989 pp_character (pp, ')');
kono
parents: 14
diff changeset
990 break;
kono
parents: 14
diff changeset
991
kono
parents: 14
diff changeset
992 case OMP_CLAUSE_VECTOR_LENGTH:
kono
parents: 14
diff changeset
993 pp_string (pp, "vector_length(");
kono
parents: 14
diff changeset
994 dump_generic_node (pp, OMP_CLAUSE_VECTOR_LENGTH_EXPR (clause),
kono
parents: 14
diff changeset
995 spc, flags, false);
kono
parents: 14
diff changeset
996 pp_character (pp, ')');
kono
parents: 14
diff changeset
997 break;
kono
parents: 14
diff changeset
998
kono
parents: 14
diff changeset
999 case OMP_CLAUSE_INBRANCH:
kono
parents: 14
diff changeset
1000 pp_string (pp, "inbranch");
kono
parents: 14
diff changeset
1001 break;
kono
parents: 14
diff changeset
1002 case OMP_CLAUSE_NOTINBRANCH:
kono
parents: 14
diff changeset
1003 pp_string (pp, "notinbranch");
kono
parents: 14
diff changeset
1004 break;
kono
parents: 14
diff changeset
1005 case OMP_CLAUSE_FOR:
kono
parents: 14
diff changeset
1006 pp_string (pp, "for");
kono
parents: 14
diff changeset
1007 break;
kono
parents: 14
diff changeset
1008 case OMP_CLAUSE_PARALLEL:
kono
parents: 14
diff changeset
1009 pp_string (pp, "parallel");
kono
parents: 14
diff changeset
1010 break;
kono
parents: 14
diff changeset
1011 case OMP_CLAUSE_SECTIONS:
kono
parents: 14
diff changeset
1012 pp_string (pp, "sections");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1013 break;
16
kono
parents: 14
diff changeset
1014 case OMP_CLAUSE_TASKGROUP:
kono
parents: 14
diff changeset
1015 pp_string (pp, "taskgroup");
kono
parents: 14
diff changeset
1016 break;
kono
parents: 14
diff changeset
1017 case OMP_CLAUSE_NOGROUP:
kono
parents: 14
diff changeset
1018 pp_string (pp, "nogroup");
kono
parents: 14
diff changeset
1019 break;
kono
parents: 14
diff changeset
1020 case OMP_CLAUSE_THREADS:
kono
parents: 14
diff changeset
1021 pp_string (pp, "threads");
kono
parents: 14
diff changeset
1022 break;
kono
parents: 14
diff changeset
1023 case OMP_CLAUSE_SIMD:
kono
parents: 14
diff changeset
1024 pp_string (pp, "simd");
kono
parents: 14
diff changeset
1025 break;
kono
parents: 14
diff changeset
1026 case OMP_CLAUSE_INDEPENDENT:
kono
parents: 14
diff changeset
1027 pp_string (pp, "independent");
kono
parents: 14
diff changeset
1028 break;
kono
parents: 14
diff changeset
1029 case OMP_CLAUSE_TILE:
kono
parents: 14
diff changeset
1030 pp_string (pp, "tile(");
kono
parents: 14
diff changeset
1031 dump_generic_node (pp, OMP_CLAUSE_TILE_LIST (clause),
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1032 spc, flags, false);
16
kono
parents: 14
diff changeset
1033 pp_right_paren (pp);
kono
parents: 14
diff changeset
1034 break;
kono
parents: 14
diff changeset
1035
kono
parents: 14
diff changeset
1036 case OMP_CLAUSE__GRIDDIM_:
kono
parents: 14
diff changeset
1037 pp_string (pp, "_griddim_(");
kono
parents: 14
diff changeset
1038 pp_unsigned_wide_integer (pp, OMP_CLAUSE__GRIDDIM__DIMENSION (clause));
kono
parents: 14
diff changeset
1039 pp_colon (pp);
kono
parents: 14
diff changeset
1040 dump_generic_node (pp, OMP_CLAUSE__GRIDDIM__SIZE (clause), spc, flags,
kono
parents: 14
diff changeset
1041 false);
kono
parents: 14
diff changeset
1042 pp_comma (pp);
kono
parents: 14
diff changeset
1043 dump_generic_node (pp, OMP_CLAUSE__GRIDDIM__GROUP (clause), spc, flags,
kono
parents: 14
diff changeset
1044 false);
kono
parents: 14
diff changeset
1045 pp_right_paren (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1046 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1047
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1048 default:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1049 /* Should never happen. */
16
kono
parents: 14
diff changeset
1050 dump_generic_node (pp, clause, spc, flags, false);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1051 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1052 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1053 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1054
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1055
16
kono
parents: 14
diff changeset
1056 /* Dump the list of OpenMP clauses. PP, SPC and FLAGS are as in
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1057 dump_generic_node. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1058
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1059 void
16
kono
parents: 14
diff changeset
1060 dump_omp_clauses (pretty_printer *pp, tree clause, int spc, dump_flags_t flags)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1061 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1062 if (clause == NULL)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1063 return;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1064
16
kono
parents: 14
diff changeset
1065 pp_space (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1066 while (1)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1067 {
16
kono
parents: 14
diff changeset
1068 dump_omp_clause (pp, clause, spc, flags);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1069 clause = OMP_CLAUSE_CHAIN (clause);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1070 if (clause == NULL)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1071 return;
16
kono
parents: 14
diff changeset
1072 pp_space (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1073 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1074 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1075
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1076
16
kono
parents: 14
diff changeset
1077 /* Dump location LOC to PP. */
kono
parents: 14
diff changeset
1078
kono
parents: 14
diff changeset
1079 void
kono
parents: 14
diff changeset
1080 dump_location (pretty_printer *pp, location_t loc)
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1081 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1082 expanded_location xloc = expand_location (loc);
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1083
16
kono
parents: 14
diff changeset
1084 pp_left_bracket (pp);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1085 if (xloc.file)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1086 {
16
kono
parents: 14
diff changeset
1087 pp_string (pp, xloc.file);
kono
parents: 14
diff changeset
1088 pp_string (pp, ":");
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1089 }
16
kono
parents: 14
diff changeset
1090 pp_decimal_int (pp, xloc.line);
kono
parents: 14
diff changeset
1091 pp_colon (pp);
kono
parents: 14
diff changeset
1092 pp_decimal_int (pp, xloc.column);
kono
parents: 14
diff changeset
1093 pp_string (pp, "] ");
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1094 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1095
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1096
16
kono
parents: 14
diff changeset
1097 /* Dump lexical block BLOCK. PP, SPC and FLAGS are as in
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1098 dump_generic_node. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1099
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1100 static void
16
kono
parents: 14
diff changeset
1101 dump_block_node (pretty_printer *pp, tree block, int spc, dump_flags_t flags)
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1102 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1103 tree t;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1104
16
kono
parents: 14
diff changeset
1105 pp_printf (pp, "BLOCK #%d ", BLOCK_NUMBER (block));
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1106
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1107 if (flags & TDF_ADDRESS)
16
kono
parents: 14
diff changeset
1108 pp_printf (pp, "[%p] ", (void *) block);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1109
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1110 if (BLOCK_ABSTRACT (block))
16
kono
parents: 14
diff changeset
1111 pp_string (pp, "[abstract] ");
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1112
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1113 if (TREE_ASM_WRITTEN (block))
16
kono
parents: 14
diff changeset
1114 pp_string (pp, "[written] ");
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1115
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1116 if (flags & TDF_SLIM)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1117 return;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1118
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1119 if (BLOCK_SOURCE_LOCATION (block))
16
kono
parents: 14
diff changeset
1120 dump_location (pp, BLOCK_SOURCE_LOCATION (block));
kono
parents: 14
diff changeset
1121
kono
parents: 14
diff changeset
1122 newline_and_indent (pp, spc + 2);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1123
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1124 if (BLOCK_SUPERCONTEXT (block))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1125 {
16
kono
parents: 14
diff changeset
1126 pp_string (pp, "SUPERCONTEXT: ");
kono
parents: 14
diff changeset
1127 dump_generic_node (pp, BLOCK_SUPERCONTEXT (block), 0,
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1128 flags | TDF_SLIM, false);
16
kono
parents: 14
diff changeset
1129 newline_and_indent (pp, spc + 2);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1130 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1131
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1132 if (BLOCK_SUBBLOCKS (block))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1133 {
16
kono
parents: 14
diff changeset
1134 pp_string (pp, "SUBBLOCKS: ");
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1135 for (t = BLOCK_SUBBLOCKS (block); t; t = BLOCK_CHAIN (t))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1136 {
16
kono
parents: 14
diff changeset
1137 dump_generic_node (pp, t, 0, flags | TDF_SLIM, false);
kono
parents: 14
diff changeset
1138 pp_space (pp);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1139 }
16
kono
parents: 14
diff changeset
1140 newline_and_indent (pp, spc + 2);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1141 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1142
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1143 if (BLOCK_CHAIN (block))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1144 {
16
kono
parents: 14
diff changeset
1145 pp_string (pp, "SIBLINGS: ");
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1146 for (t = BLOCK_CHAIN (block); t; t = BLOCK_CHAIN (t))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1147 {
16
kono
parents: 14
diff changeset
1148 dump_generic_node (pp, t, 0, flags | TDF_SLIM, false);
kono
parents: 14
diff changeset
1149 pp_space (pp);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1150 }
16
kono
parents: 14
diff changeset
1151 newline_and_indent (pp, spc + 2);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1152 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1153
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1154 if (BLOCK_VARS (block))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1155 {
16
kono
parents: 14
diff changeset
1156 pp_string (pp, "VARS: ");
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1157 for (t = BLOCK_VARS (block); t; t = TREE_CHAIN (t))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1158 {
16
kono
parents: 14
diff changeset
1159 dump_generic_node (pp, t, 0, flags, false);
kono
parents: 14
diff changeset
1160 pp_space (pp);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1161 }
16
kono
parents: 14
diff changeset
1162 newline_and_indent (pp, spc + 2);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1163 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1164
16
kono
parents: 14
diff changeset
1165 if (vec_safe_length (BLOCK_NONLOCALIZED_VARS (block)) > 0)
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1166 {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1167 unsigned i;
16
kono
parents: 14
diff changeset
1168 vec<tree, va_gc> *nlv = BLOCK_NONLOCALIZED_VARS (block);
kono
parents: 14
diff changeset
1169
kono
parents: 14
diff changeset
1170 pp_string (pp, "NONLOCALIZED_VARS: ");
kono
parents: 14
diff changeset
1171 FOR_EACH_VEC_ELT (*nlv, i, t)
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1172 {
16
kono
parents: 14
diff changeset
1173 dump_generic_node (pp, t, 0, flags, false);
kono
parents: 14
diff changeset
1174 pp_space (pp);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1175 }
16
kono
parents: 14
diff changeset
1176 newline_and_indent (pp, spc + 2);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1177 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1178
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1179 if (BLOCK_ABSTRACT_ORIGIN (block))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1180 {
16
kono
parents: 14
diff changeset
1181 pp_string (pp, "ABSTRACT_ORIGIN: ");
kono
parents: 14
diff changeset
1182 dump_generic_node (pp, BLOCK_ABSTRACT_ORIGIN (block), 0,
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1183 flags | TDF_SLIM, false);
16
kono
parents: 14
diff changeset
1184 newline_and_indent (pp, spc + 2);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1185 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1186
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1187 if (BLOCK_FRAGMENT_ORIGIN (block))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1188 {
16
kono
parents: 14
diff changeset
1189 pp_string (pp, "FRAGMENT_ORIGIN: ");
kono
parents: 14
diff changeset
1190 dump_generic_node (pp, BLOCK_FRAGMENT_ORIGIN (block), 0,
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1191 flags | TDF_SLIM, false);
16
kono
parents: 14
diff changeset
1192 newline_and_indent (pp, spc + 2);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1193 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1194
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1195 if (BLOCK_FRAGMENT_CHAIN (block))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1196 {
16
kono
parents: 14
diff changeset
1197 pp_string (pp, "FRAGMENT_CHAIN: ");
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1198 for (t = BLOCK_FRAGMENT_CHAIN (block); t; t = BLOCK_FRAGMENT_CHAIN (t))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1199 {
16
kono
parents: 14
diff changeset
1200 dump_generic_node (pp, t, 0, flags | TDF_SLIM, false);
kono
parents: 14
diff changeset
1201 pp_space (pp);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1202 }
16
kono
parents: 14
diff changeset
1203 newline_and_indent (pp, spc + 2);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1204 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1205 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1206
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1207
16
kono
parents: 14
diff changeset
1208 /* Dump the node NODE on the pretty_printer PP, SPC spaces of
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1209 indent. FLAGS specifies details to show in the dump (see TDF_* in
16
kono
parents: 14
diff changeset
1210 dumpfile.h). If IS_STMT is true, the object printed is considered
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1211 to be a statement and it is terminated by ';' if appropriate. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1212
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1213 int
16
kono
parents: 14
diff changeset
1214 dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags,
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1215 bool is_stmt)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1216 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1217 tree type;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1218 tree op0, op1;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1219 const char *str;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1220 bool is_expr;
16
kono
parents: 14
diff changeset
1221 enum tree_code code;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1222
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1223 if (node == NULL_TREE)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1224 return spc;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1225
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1226 is_expr = EXPR_P (node);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1227
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1228 if (is_stmt && (flags & TDF_STMTADDR))
16
kono
parents: 14
diff changeset
1229 pp_printf (pp, "<&%p> ", (void *)node);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1230
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1231 if ((flags & TDF_LINENO) && EXPR_HAS_LOCATION (node))
16
kono
parents: 14
diff changeset
1232 dump_location (pp, EXPR_LOCATION (node));
kono
parents: 14
diff changeset
1233
kono
parents: 14
diff changeset
1234 code = TREE_CODE (node);
kono
parents: 14
diff changeset
1235 switch (code)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1236 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1237 case ERROR_MARK:
16
kono
parents: 14
diff changeset
1238 pp_string (pp, "<<< error >>>");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1239 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1240
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1241 case IDENTIFIER_NODE:
16
kono
parents: 14
diff changeset
1242 pp_tree_identifier (pp, node);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1243 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1244
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1245 case TREE_LIST:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1246 while (node && node != error_mark_node)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1247 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1248 if (TREE_PURPOSE (node))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1249 {
16
kono
parents: 14
diff changeset
1250 dump_generic_node (pp, TREE_PURPOSE (node), spc, flags, false);
kono
parents: 14
diff changeset
1251 pp_space (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1252 }
16
kono
parents: 14
diff changeset
1253 dump_generic_node (pp, TREE_VALUE (node), spc, flags, false);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1254 node = TREE_CHAIN (node);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1255 if (node && TREE_CODE (node) == TREE_LIST)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1256 {
16
kono
parents: 14
diff changeset
1257 pp_comma (pp);
kono
parents: 14
diff changeset
1258 pp_space (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1259 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1260 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1261 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1262
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1263 case TREE_BINFO:
16
kono
parents: 14
diff changeset
1264 dump_generic_node (pp, BINFO_TYPE (node), spc, flags, false);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1265 break;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1266
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1267 case TREE_VEC:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1268 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1269 size_t i;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1270 if (TREE_VEC_LENGTH (node) > 0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1271 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1272 size_t len = TREE_VEC_LENGTH (node);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1273 for (i = 0; i < len - 1; i++)
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1274 {
16
kono
parents: 14
diff changeset
1275 dump_generic_node (pp, TREE_VEC_ELT (node, i), spc, flags,
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1276 false);
16
kono
parents: 14
diff changeset
1277 pp_comma (pp);
kono
parents: 14
diff changeset
1278 pp_space (pp);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1279 }
16
kono
parents: 14
diff changeset
1280 dump_generic_node (pp, TREE_VEC_ELT (node, len - 1), spc,
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1281 flags, false);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1282 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1283 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1284 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1285
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1286 case VOID_TYPE:
16
kono
parents: 14
diff changeset
1287 case POINTER_BOUNDS_TYPE:
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1288 case INTEGER_TYPE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1289 case REAL_TYPE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1290 case FIXED_POINT_TYPE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1291 case COMPLEX_TYPE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1292 case VECTOR_TYPE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1293 case ENUMERAL_TYPE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1294 case BOOLEAN_TYPE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1295 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1296 unsigned int quals = TYPE_QUALS (node);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1297 enum tree_code_class tclass;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1298
16
kono
parents: 14
diff changeset
1299 if (quals & TYPE_QUAL_ATOMIC)
kono
parents: 14
diff changeset
1300 pp_string (pp, "atomic ");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1301 if (quals & TYPE_QUAL_CONST)
16
kono
parents: 14
diff changeset
1302 pp_string (pp, "const ");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1303 else if (quals & TYPE_QUAL_VOLATILE)
16
kono
parents: 14
diff changeset
1304 pp_string (pp, "volatile ");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1305 else if (quals & TYPE_QUAL_RESTRICT)
16
kono
parents: 14
diff changeset
1306 pp_string (pp, "restrict ");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1307
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1308 if (!ADDR_SPACE_GENERIC_P (TYPE_ADDR_SPACE (node)))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1309 {
16
kono
parents: 14
diff changeset
1310 pp_string (pp, "<address-space-");
kono
parents: 14
diff changeset
1311 pp_decimal_int (pp, TYPE_ADDR_SPACE (node));
kono
parents: 14
diff changeset
1312 pp_string (pp, "> ");
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1313 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1314
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1315 tclass = TREE_CODE_CLASS (TREE_CODE (node));
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1316
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1317 if (tclass == tcc_declaration)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1318 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1319 if (DECL_NAME (node))
16
kono
parents: 14
diff changeset
1320 dump_decl_name (pp, node, flags);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1321 else
16
kono
parents: 14
diff changeset
1322 pp_string (pp, "<unnamed type decl>");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1323 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1324 else if (tclass == tcc_type)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1325 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1326 if (TYPE_NAME (node))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1327 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1328 if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
16
kono
parents: 14
diff changeset
1329 pp_tree_identifier (pp, TYPE_NAME (node));
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1330 else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1331 && DECL_NAME (TYPE_NAME (node)))
16
kono
parents: 14
diff changeset
1332 dump_decl_name (pp, TYPE_NAME (node), flags);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1333 else
16
kono
parents: 14
diff changeset
1334 pp_string (pp, "<unnamed type>");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1335 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1336 else if (TREE_CODE (node) == VECTOR_TYPE)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1337 {
16
kono
parents: 14
diff changeset
1338 pp_string (pp, "vector");
kono
parents: 14
diff changeset
1339 pp_left_paren (pp);
kono
parents: 14
diff changeset
1340 pp_wide_integer (pp, TYPE_VECTOR_SUBPARTS (node));
kono
parents: 14
diff changeset
1341 pp_string (pp, ") ");
kono
parents: 14
diff changeset
1342 dump_generic_node (pp, TREE_TYPE (node), spc, flags, false);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1343 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1344 else if (TREE_CODE (node) == INTEGER_TYPE)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1345 {
16
kono
parents: 14
diff changeset
1346 if (TYPE_PRECISION (node) == CHAR_TYPE_SIZE)
kono
parents: 14
diff changeset
1347 pp_string (pp, (TYPE_UNSIGNED (node)
kono
parents: 14
diff changeset
1348 ? "unsigned char"
kono
parents: 14
diff changeset
1349 : "signed char"));
kono
parents: 14
diff changeset
1350 else if (TYPE_PRECISION (node) == SHORT_TYPE_SIZE)
kono
parents: 14
diff changeset
1351 pp_string (pp, (TYPE_UNSIGNED (node)
kono
parents: 14
diff changeset
1352 ? "unsigned short"
kono
parents: 14
diff changeset
1353 : "signed short"));
kono
parents: 14
diff changeset
1354 else if (TYPE_PRECISION (node) == INT_TYPE_SIZE)
kono
parents: 14
diff changeset
1355 pp_string (pp, (TYPE_UNSIGNED (node)
kono
parents: 14
diff changeset
1356 ? "unsigned int"
kono
parents: 14
diff changeset
1357 : "signed int"));
kono
parents: 14
diff changeset
1358 else if (TYPE_PRECISION (node) == LONG_TYPE_SIZE)
kono
parents: 14
diff changeset
1359 pp_string (pp, (TYPE_UNSIGNED (node)
kono
parents: 14
diff changeset
1360 ? "unsigned long"
kono
parents: 14
diff changeset
1361 : "signed long"));
kono
parents: 14
diff changeset
1362 else if (TYPE_PRECISION (node) == LONG_LONG_TYPE_SIZE)
kono
parents: 14
diff changeset
1363 pp_string (pp, (TYPE_UNSIGNED (node)
kono
parents: 14
diff changeset
1364 ? "unsigned long long"
kono
parents: 14
diff changeset
1365 : "signed long long"));
kono
parents: 14
diff changeset
1366 else if (TYPE_PRECISION (node) >= CHAR_TYPE_SIZE
kono
parents: 14
diff changeset
1367 && pow2p_hwi (TYPE_PRECISION (node)))
kono
parents: 14
diff changeset
1368 {
kono
parents: 14
diff changeset
1369 pp_string (pp, (TYPE_UNSIGNED (node) ? "uint" : "int"));
kono
parents: 14
diff changeset
1370 pp_decimal_int (pp, TYPE_PRECISION (node));
kono
parents: 14
diff changeset
1371 pp_string (pp, "_t");
kono
parents: 14
diff changeset
1372 }
kono
parents: 14
diff changeset
1373 else
kono
parents: 14
diff changeset
1374 {
kono
parents: 14
diff changeset
1375 pp_string (pp, (TYPE_UNSIGNED (node)
kono
parents: 14
diff changeset
1376 ? "<unnamed-unsigned:"
kono
parents: 14
diff changeset
1377 : "<unnamed-signed:"));
kono
parents: 14
diff changeset
1378 pp_decimal_int (pp, TYPE_PRECISION (node));
kono
parents: 14
diff changeset
1379 pp_greater (pp);
kono
parents: 14
diff changeset
1380 }
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1381 }
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1382 else if (TREE_CODE (node) == COMPLEX_TYPE)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1383 {
16
kono
parents: 14
diff changeset
1384 pp_string (pp, "__complex__ ");
kono
parents: 14
diff changeset
1385 dump_generic_node (pp, TREE_TYPE (node), spc, flags, false);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1386 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1387 else if (TREE_CODE (node) == REAL_TYPE)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1388 {
16
kono
parents: 14
diff changeset
1389 pp_string (pp, "<float:");
kono
parents: 14
diff changeset
1390 pp_decimal_int (pp, TYPE_PRECISION (node));
kono
parents: 14
diff changeset
1391 pp_greater (pp);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1392 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1393 else if (TREE_CODE (node) == FIXED_POINT_TYPE)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1394 {
16
kono
parents: 14
diff changeset
1395 pp_string (pp, "<fixed-point-");
kono
parents: 14
diff changeset
1396 pp_string (pp, TYPE_SATURATING (node) ? "sat:" : "nonsat:");
kono
parents: 14
diff changeset
1397 pp_decimal_int (pp, TYPE_PRECISION (node));
kono
parents: 14
diff changeset
1398 pp_greater (pp);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1399 }
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1400 else if (TREE_CODE (node) == VOID_TYPE)
16
kono
parents: 14
diff changeset
1401 pp_string (pp, "void");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1402 else
16
kono
parents: 14
diff changeset
1403 pp_string (pp, "<unnamed type>");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1404 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1405 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1406 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1407
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1408 case POINTER_TYPE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1409 case REFERENCE_TYPE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1410 str = (TREE_CODE (node) == POINTER_TYPE ? "*" : "&");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1411
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1412 if (TREE_TYPE (node) == NULL)
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1413 {
16
kono
parents: 14
diff changeset
1414 pp_string (pp, str);
kono
parents: 14
diff changeset
1415 pp_string (pp, "<null type>");
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1416 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1417 else if (TREE_CODE (TREE_TYPE (node)) == FUNCTION_TYPE)
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1418 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1419 tree fnode = TREE_TYPE (node);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1420
16
kono
parents: 14
diff changeset
1421 dump_generic_node (pp, TREE_TYPE (fnode), spc, flags, false);
kono
parents: 14
diff changeset
1422 pp_space (pp);
kono
parents: 14
diff changeset
1423 pp_left_paren (pp);
kono
parents: 14
diff changeset
1424 pp_string (pp, str);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1425 if (TYPE_NAME (node) && DECL_NAME (TYPE_NAME (node)))
16
kono
parents: 14
diff changeset
1426 dump_decl_name (pp, TYPE_NAME (node), flags);
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1427 else if (flags & TDF_NOUID)
16
kono
parents: 14
diff changeset
1428 pp_printf (pp, "<Txxxx>");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1429 else
16
kono
parents: 14
diff changeset
1430 pp_printf (pp, "<T%x>", TYPE_UID (node));
kono
parents: 14
diff changeset
1431
kono
parents: 14
diff changeset
1432 pp_right_paren (pp);
kono
parents: 14
diff changeset
1433 dump_function_declaration (pp, fnode, spc, flags);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1434 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1435 else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1436 {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1437 unsigned int quals = TYPE_QUALS (node);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1438
16
kono
parents: 14
diff changeset
1439 dump_generic_node (pp, TREE_TYPE (node), spc, flags, false);
kono
parents: 14
diff changeset
1440 pp_space (pp);
kono
parents: 14
diff changeset
1441 pp_string (pp, str);
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1442
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1443 if (quals & TYPE_QUAL_CONST)
16
kono
parents: 14
diff changeset
1444 pp_string (pp, " const");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1445 if (quals & TYPE_QUAL_VOLATILE)
16
kono
parents: 14
diff changeset
1446 pp_string (pp, " volatile");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1447 if (quals & TYPE_QUAL_RESTRICT)
16
kono
parents: 14
diff changeset
1448 pp_string (pp, " restrict");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1449
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1450 if (!ADDR_SPACE_GENERIC_P (TYPE_ADDR_SPACE (node)))
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1451 {
16
kono
parents: 14
diff changeset
1452 pp_string (pp, " <address-space-");
kono
parents: 14
diff changeset
1453 pp_decimal_int (pp, TYPE_ADDR_SPACE (node));
kono
parents: 14
diff changeset
1454 pp_greater (pp);
9
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1455 }
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1456
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1457 if (TYPE_REF_CAN_ALIAS_ALL (node))
16
kono
parents: 14
diff changeset
1458 pp_string (pp, " {ref-all}");
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1459 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1460 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1461
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1462 case OFFSET_TYPE:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1463 NIY;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1464 break;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1465
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1466 case MEM_REF:
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1467 {
16
kono
parents: 14
diff changeset
1468 if (flags & TDF_GIMPLE)
kono
parents: 14
diff changeset
1469 {
kono
parents: 14
diff changeset
1470 pp_string (pp, "__MEM <");
kono
parents: 14
diff changeset
1471 dump_generic_node (pp, TREE_TYPE (node),
kono
parents: 14
diff changeset
1472 spc, flags | TDF_SLIM, false);
kono
parents: 14
diff changeset
1473 if (TYPE_ALIGN (TREE_TYPE (node))
kono
parents: 14
diff changeset
1474 != TYPE_ALIGN (TYPE_MAIN_VARIANT (TREE_TYPE (node))))
kono
parents: 14
diff changeset
1475 {
kono
parents: 14
diff changeset
1476 pp_string (pp, ", ");
kono
parents: 14
diff changeset
1477 pp_decimal_int (pp, TYPE_ALIGN (TREE_TYPE (node)));
kono
parents: 14
diff changeset
1478 }
kono
parents: 14
diff changeset
1479 pp_greater (pp);
kono
parents: 14
diff changeset
1480 pp_string (pp, " (");
kono
parents: 14
diff changeset
1481 if (TREE_TYPE (TREE_OPERAND (node, 0))
kono
parents: 14
diff changeset
1482 != TREE_TYPE (TREE_OPERAND (node, 1)))
kono
parents: 14
diff changeset
1483 {
kono
parents: 14
diff changeset
1484 pp_left_paren (pp);
kono
parents: 14
diff changeset
1485 dump_generic_node (pp, TREE_TYPE (TREE_OPERAND (node, 1)),
kono
parents: 14
diff changeset
1486 spc, flags | TDF_SLIM, false);
kono
parents: 14
diff changeset
1487 pp_right_paren (pp);
kono
parents: 14
diff changeset
1488 }
kono
parents: 14
diff changeset
1489 dump_generic_node (pp, TREE_OPERAND (node, 0),
kono
parents: 14
diff changeset
1490 spc, flags | TDF_SLIM, false);
kono
parents: 14
diff changeset
1491 if (! integer_zerop (TREE_OPERAND (node, 1)))
kono
parents: 14
diff changeset
1492 {
kono
parents: 14
diff changeset
1493 pp_string (pp, " + ");
kono
parents: 14
diff changeset
1494 dump_generic_node (pp, TREE_OPERAND (node, 1),
kono
parents: 14
diff changeset
1495 spc, flags | TDF_SLIM, false);
kono
parents: 14
diff changeset
1496 }
kono
parents: 14
diff changeset
1497 pp_right_paren (pp);
kono
parents: 14
diff changeset
1498 }
kono
parents: 14
diff changeset
1499 else if (integer_zerop (TREE_OPERAND (node, 1))
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1500 /* Dump the types of INTEGER_CSTs explicitly, for we can't
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1501 infer them and MEM_ATTR caching will share MEM_REFs
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1502 with differently-typed op0s. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1503 && TREE_CODE (TREE_OPERAND (node, 0)) != INTEGER_CST
16
kono
parents: 14
diff changeset
1504 /* Released SSA_NAMES have no TREE_TYPE. */
kono
parents: 14
diff changeset
1505 && TREE_TYPE (TREE_OPERAND (node, 0)) != NULL_TREE
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1506 /* Same pointer types, but ignoring POINTER_TYPE vs.
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1507 REFERENCE_TYPE. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1508 && (TREE_TYPE (TREE_TYPE (TREE_OPERAND (node, 0)))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1509 == TREE_TYPE (TREE_TYPE (TREE_OPERAND (node, 1))))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1510 && (TYPE_MODE (TREE_TYPE (TREE_OPERAND (node, 0)))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1511 == TYPE_MODE (TREE_TYPE (TREE_OPERAND (node, 1))))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1512 && (TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (TREE_OPERAND (node, 0)))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1513 == TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (TREE_OPERAND (node, 1))))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1514 /* Same value types ignoring qualifiers. */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1515 && (TYPE_MAIN_VARIANT (TREE_TYPE (node))
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1516 == TYPE_MAIN_VARIANT
16
kono
parents: 14
diff changeset
1517 (TREE_TYPE (TREE_TYPE (TREE_OPERAND (node, 1)))))
kono
parents: 14
diff changeset
1518 && (!(flags & TDF_ALIAS)
kono
parents: 14
diff changeset
1519 || MR_DEPENDENCE_CLIQUE (node) == 0))
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1520 {
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1521 if (TREE_CODE (TREE_OPERAND (node, 0)) != ADDR_EXPR)
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1522 {
16
kono
parents: 14
diff changeset
1523 pp_star (pp);
kono
parents: 14
diff changeset
1524 dump_generic_node (pp, TREE_OPERAND (node, 0),
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1525 spc, flags, false);
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1526 }
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1527 else
16
kono
parents: 14
diff changeset
1528 dump_generic_node (pp,
14
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1529 TREE_OPERAND (TREE_OPERAND (node, 0), 0),
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1530 spc, flags, false);
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1531 }
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1532 else
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
1533 {