Mercurial > hg > CbC > CbC_gcc
comparison gcc/gimple-pretty-print.c @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | b7f97abdc517 |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
226 break; | 226 break; |
227 | 227 |
228 default: | 228 default: |
229 gcc_unreachable (); | 229 gcc_unreachable (); |
230 } | 230 } |
231 } | 231 } |
232 else | 232 else |
233 pp_character (buffer, *c); | 233 pp_character (buffer, *c); |
234 } | 234 } |
235 va_end (args); | 235 va_end (args); |
236 } | 236 } |
252 case ASSERT_EXPR: | 252 case ASSERT_EXPR: |
253 dump_generic_node (buffer, rhs, spc, flags, false); | 253 dump_generic_node (buffer, rhs, spc, flags, false); |
254 break; | 254 break; |
255 | 255 |
256 case FIXED_CONVERT_EXPR: | 256 case FIXED_CONVERT_EXPR: |
257 case ADDR_SPACE_CONVERT_EXPR: | |
257 case FIX_TRUNC_EXPR: | 258 case FIX_TRUNC_EXPR: |
258 case FLOAT_EXPR: | 259 case FLOAT_EXPR: |
259 CASE_CONVERT: | 260 CASE_CONVERT: |
260 pp_character (buffer, '('); | 261 pp_character (buffer, '('); |
261 dump_generic_node (buffer, TREE_TYPE (lhs), spc, flags, false); | 262 dump_generic_node (buffer, TREE_TYPE (lhs), spc, flags, false); |
267 pp_character (buffer, ')'); | 268 pp_character (buffer, ')'); |
268 } | 269 } |
269 else | 270 else |
270 dump_generic_node (buffer, rhs, spc, flags, false); | 271 dump_generic_node (buffer, rhs, spc, flags, false); |
271 break; | 272 break; |
272 | 273 |
273 case PAREN_EXPR: | 274 case PAREN_EXPR: |
274 pp_string (buffer, "(("); | 275 pp_string (buffer, "(("); |
275 dump_generic_node (buffer, rhs, spc, flags, false); | 276 dump_generic_node (buffer, rhs, spc, flags, false); |
276 pp_string (buffer, "))"); | 277 pp_string (buffer, "))"); |
277 break; | 278 break; |
278 | 279 |
279 case ABS_EXPR: | 280 case ABS_EXPR: |
280 pp_string (buffer, "ABS_EXPR <"); | 281 pp_string (buffer, "ABS_EXPR <"); |
281 dump_generic_node (buffer, rhs, spc, flags, false); | 282 dump_generic_node (buffer, rhs, spc, flags, false); |
282 pp_character (buffer, '>'); | 283 pp_character (buffer, '>'); |
283 break; | 284 break; |
506 if (gimple_has_volatile_ops (gs)) | 507 if (gimple_has_volatile_ops (gs)) |
507 pp_string (buffer, "{v}"); | 508 pp_string (buffer, "{v}"); |
508 | 509 |
509 pp_space (buffer); | 510 pp_space (buffer); |
510 } | 511 } |
511 dump_generic_node (buffer, gimple_call_fn (gs), spc, flags, false); | 512 print_call_name (buffer, gimple_call_fn (gs), flags); |
512 pp_string (buffer, " ("); | 513 pp_string (buffer, " ("); |
513 dump_gimple_call_args (buffer, gs, flags); | 514 dump_gimple_call_args (buffer, gs, flags); |
514 pp_character (buffer, ')'); | 515 pp_character (buffer, ')'); |
515 if (!(flags & TDF_RHS_ONLY)) | 516 if (!(flags & TDF_RHS_ONLY)) |
516 pp_semicolon (buffer); | 517 pp_semicolon (buffer); |
624 dump_generic_node (buffer, label, spc, flags, false); | 625 dump_generic_node (buffer, label, spc, flags, false); |
625 pp_character (buffer, ':'); | 626 pp_character (buffer, ':'); |
626 } | 627 } |
627 if (DECL_NONLOCAL (label)) | 628 if (DECL_NONLOCAL (label)) |
628 pp_string (buffer, " [non-local]"); | 629 pp_string (buffer, " [non-local]"); |
630 if ((flags & TDF_EH) && EH_LANDING_PAD_NR (label)) | |
631 pp_printf (buffer, " [LP %d]", EH_LANDING_PAD_NR (label)); | |
629 } | 632 } |
630 | 633 |
631 /* Dump a GIMPLE_GOTO tuple on the pretty_printer BUFFER, SPC | 634 /* Dump a GIMPLE_GOTO tuple on the pretty_printer BUFFER, SPC |
632 spaces of indent. FLAGS specifies details to show in the dump (see | 635 spaces of indent. FLAGS specifies details to show in the dump (see |
633 TDF_* in tree-pass.h). */ | 636 TDF_* in tree-pass.h). */ |
764 gimple_eh_filter_types (gs), | 767 gimple_eh_filter_types (gs), |
765 gimple_eh_filter_failure (gs)); | 768 gimple_eh_filter_failure (gs)); |
766 } | 769 } |
767 | 770 |
768 | 771 |
772 /* Dump a GIMPLE_EH_MUST_NOT_THROW tuple. */ | |
773 | |
774 static void | |
775 dump_gimple_eh_must_not_throw (pretty_printer *buffer, gimple gs, | |
776 int spc, int flags) | |
777 { | |
778 if (flags & TDF_RAW) | |
779 dump_gimple_fmt (buffer, spc, flags, "%G <%T>", gs, | |
780 gimple_eh_must_not_throw_fndecl (gs)); | |
781 else | |
782 dump_gimple_fmt (buffer, spc, flags, "<<<eh_must_not_throw (%T)>>>", | |
783 gimple_eh_must_not_throw_fndecl (gs)); | |
784 } | |
785 | |
786 | |
769 /* Dump a GIMPLE_RESX tuple on the pretty_printer BUFFER, SPC spaces of | 787 /* Dump a GIMPLE_RESX tuple on the pretty_printer BUFFER, SPC spaces of |
770 indent. FLAGS specifies details to show in the dump (see TDF_* in | 788 indent. FLAGS specifies details to show in the dump (see TDF_* in |
771 tree-pass.h). */ | 789 tree-pass.h). */ |
772 | 790 |
773 static void | 791 static void |
774 dump_gimple_resx (pretty_printer *buffer, gimple gs, int spc, int flags) | 792 dump_gimple_resx (pretty_printer *buffer, gimple gs, int spc, int flags) |
775 { | 793 { |
776 if (flags & TDF_RAW) | 794 if (flags & TDF_RAW) |
777 dump_gimple_fmt (buffer, spc, flags, "%G <%d>", gs, | 795 dump_gimple_fmt (buffer, spc, flags, "%G <%d>", gs, |
778 gimple_resx_region (gs)); | 796 gimple_resx_region (gs)); |
779 else | 797 else |
780 dump_gimple_fmt (buffer, spc, flags, "resx %d", gimple_resx_region (gs)); | 798 dump_gimple_fmt (buffer, spc, flags, "resx %d", gimple_resx_region (gs)); |
799 } | |
800 | |
801 /* Dump a GIMPLE_EH_DISPATCH tuple on the pretty_printer BUFFER. */ | |
802 | |
803 static void | |
804 dump_gimple_eh_dispatch (pretty_printer *buffer, gimple gs, int spc, int flags) | |
805 { | |
806 if (flags & TDF_RAW) | |
807 dump_gimple_fmt (buffer, spc, flags, "%G <%d>", gs, | |
808 gimple_eh_dispatch_region (gs)); | |
809 else | |
810 dump_gimple_fmt (buffer, spc, flags, "eh_dispatch %d", | |
811 gimple_eh_dispatch_region (gs)); | |
812 } | |
813 | |
814 /* Dump a GIMPLE_DEBUG tuple on the pretty_printer BUFFER, SPC spaces | |
815 of indent. FLAGS specifies details to show in the dump (see TDF_* | |
816 in tree-pass.h). */ | |
817 | |
818 static void | |
819 dump_gimple_debug (pretty_printer *buffer, gimple gs, int spc, int flags) | |
820 { | |
821 switch (gs->gsbase.subcode) | |
822 { | |
823 case GIMPLE_DEBUG_BIND: | |
824 if (flags & TDF_RAW) | |
825 dump_gimple_fmt (buffer, spc, flags, "%G BIND <%T, %T>", gs, | |
826 gimple_debug_bind_get_var (gs), | |
827 gimple_debug_bind_get_value (gs)); | |
828 else | |
829 dump_gimple_fmt (buffer, spc, flags, "# DEBUG %T => %T", | |
830 gimple_debug_bind_get_var (gs), | |
831 gimple_debug_bind_get_value (gs)); | |
832 break; | |
833 | |
834 default: | |
835 gcc_unreachable (); | |
836 } | |
781 } | 837 } |
782 | 838 |
783 /* Dump a GIMPLE_OMP_FOR tuple on the pretty_printer BUFFER. */ | 839 /* Dump a GIMPLE_OMP_FOR tuple on the pretty_printer BUFFER. */ |
784 static void | 840 static void |
785 dump_gimple_omp_for (pretty_printer *buffer, gimple gs, int spc, int flags) | 841 dump_gimple_omp_for (pretty_printer *buffer, gimple gs, int spc, int flags) |
1044 tree-pass.h). */ | 1100 tree-pass.h). */ |
1045 | 1101 |
1046 static void | 1102 static void |
1047 dump_gimple_asm (pretty_printer *buffer, gimple gs, int spc, int flags) | 1103 dump_gimple_asm (pretty_printer *buffer, gimple gs, int spc, int flags) |
1048 { | 1104 { |
1049 unsigned int i; | 1105 unsigned int i, n, f, fields; |
1050 | 1106 |
1051 if (flags & TDF_RAW) | 1107 if (flags & TDF_RAW) |
1052 dump_gimple_fmt (buffer, spc, flags, "%G <%+STRING <%n%s%n>", gs, | 1108 { |
1053 gimple_asm_string (gs)); | 1109 dump_gimple_fmt (buffer, spc, flags, "%G <%+STRING <%n%s%n>", gs, |
1110 gimple_asm_string (gs)); | |
1111 | |
1112 n = gimple_asm_noutputs (gs); | |
1113 if (n) | |
1114 { | |
1115 newline_and_indent (buffer, spc + 2); | |
1116 pp_string (buffer, "OUTPUT: "); | |
1117 for (i = 0; i < n; i++) | |
1118 { | |
1119 dump_generic_node (buffer, gimple_asm_output_op (gs, i), | |
1120 spc, flags, false); | |
1121 if (i < n - 1) | |
1122 pp_string (buffer, ", "); | |
1123 } | |
1124 } | |
1125 | |
1126 n = gimple_asm_ninputs (gs); | |
1127 if (n) | |
1128 { | |
1129 newline_and_indent (buffer, spc + 2); | |
1130 pp_string (buffer, "INPUT: "); | |
1131 for (i = 0; i < n; i++) | |
1132 { | |
1133 dump_generic_node (buffer, gimple_asm_input_op (gs, i), | |
1134 spc, flags, false); | |
1135 if (i < n - 1) | |
1136 pp_string (buffer, ", "); | |
1137 } | |
1138 } | |
1139 | |
1140 n = gimple_asm_nclobbers (gs); | |
1141 if (n) | |
1142 { | |
1143 newline_and_indent (buffer, spc + 2); | |
1144 pp_string (buffer, "CLOBBER: "); | |
1145 for (i = 0; i < n; i++) | |
1146 { | |
1147 dump_generic_node (buffer, gimple_asm_clobber_op (gs, i), | |
1148 spc, flags, false); | |
1149 if (i < n - 1) | |
1150 pp_string (buffer, ", "); | |
1151 } | |
1152 } | |
1153 | |
1154 n = gimple_asm_nlabels (gs); | |
1155 if (n) | |
1156 { | |
1157 newline_and_indent (buffer, spc + 2); | |
1158 pp_string (buffer, "LABEL: "); | |
1159 for (i = 0; i < n; i++) | |
1160 { | |
1161 dump_generic_node (buffer, gimple_asm_label_op (gs, i), | |
1162 spc, flags, false); | |
1163 if (i < n - 1) | |
1164 pp_string (buffer, ", "); | |
1165 } | |
1166 } | |
1167 | |
1168 newline_and_indent (buffer, spc); | |
1169 pp_character (buffer, '>'); | |
1170 } | |
1054 else | 1171 else |
1055 { | 1172 { |
1056 pp_string (buffer, "__asm__"); | 1173 pp_string (buffer, "__asm__"); |
1057 if (gimple_asm_volatile_p (gs)) | 1174 if (gimple_asm_volatile_p (gs)) |
1058 pp_string (buffer, " __volatile__"); | 1175 pp_string (buffer, " __volatile__"); |
1176 if (gimple_asm_nlabels (gs)) | |
1177 pp_string (buffer, " goto"); | |
1059 pp_string (buffer, "(\""); | 1178 pp_string (buffer, "(\""); |
1060 pp_string (buffer, gimple_asm_string (gs)); | 1179 pp_string (buffer, gimple_asm_string (gs)); |
1061 pp_string (buffer, "\""); | 1180 pp_string (buffer, "\""); |
1062 } | 1181 |
1063 | 1182 if (gimple_asm_nlabels (gs)) |
1064 if (gimple_asm_ninputs (gs) | 1183 fields = 4; |
1065 || gimple_asm_noutputs (gs) | 1184 else if (gimple_asm_nclobbers (gs)) |
1066 || gimple_asm_nclobbers (gs)) | 1185 fields = 3; |
1067 { | 1186 else if (gimple_asm_ninputs (gs)) |
1068 if (gimple_asm_noutputs (gs)) | 1187 fields = 2; |
1069 { | 1188 else if (gimple_asm_noutputs (gs)) |
1070 if (flags & TDF_RAW) | 1189 fields = 1; |
1071 { | 1190 else |
1072 newline_and_indent (buffer, spc + 2); | 1191 fields = 0; |
1073 pp_string (buffer, "OUTPUT: "); | 1192 |
1074 } | 1193 for (f = 0; f < fields; ++f) |
1075 else | 1194 { |
1076 pp_string (buffer, " : "); | 1195 pp_string (buffer, " : "); |
1077 } | 1196 |
1078 | 1197 switch (f) |
1079 for (i = 0; i < gimple_asm_noutputs (gs); i++) | 1198 { |
1080 { | 1199 case 0: |
1081 dump_generic_node (buffer, gimple_asm_output_op (gs, i), spc, flags, | 1200 n = gimple_asm_noutputs (gs); |
1082 false); | 1201 for (i = 0; i < n; i++) |
1083 if ( i < gimple_asm_noutputs (gs) -1) | 1202 { |
1084 pp_string (buffer, ", "); | 1203 dump_generic_node (buffer, gimple_asm_output_op (gs, i), |
1085 } | 1204 spc, flags, false); |
1086 | 1205 if (i < n - 1) |
1087 if (gimple_asm_ninputs (gs)) | 1206 pp_string (buffer, ", "); |
1088 { | 1207 } |
1089 if (flags & TDF_RAW) | 1208 break; |
1090 { | 1209 |
1091 newline_and_indent (buffer, spc + 2); | 1210 case 1: |
1092 pp_string (buffer, "INPUT: "); | 1211 n = gimple_asm_ninputs (gs); |
1093 } | 1212 for (i = 0; i < n; i++) |
1094 else | 1213 { |
1095 pp_string (buffer, " : "); | 1214 dump_generic_node (buffer, gimple_asm_input_op (gs, i), |
1096 } | 1215 spc, flags, false); |
1097 | 1216 if (i < n - 1) |
1098 for (i = 0; i < gimple_asm_ninputs (gs); i++) | 1217 pp_string (buffer, ", "); |
1099 { | 1218 } |
1100 dump_generic_node (buffer, gimple_asm_input_op (gs, i), spc, flags, | 1219 break; |
1101 false); | 1220 |
1102 if (i < gimple_asm_ninputs (gs) -1) | 1221 case 2: |
1103 pp_string (buffer, " : "); | 1222 n = gimple_asm_nclobbers (gs); |
1104 } | 1223 for (i = 0; i < n; i++) |
1105 | 1224 { |
1106 if (gimple_asm_nclobbers (gs)) | 1225 dump_generic_node (buffer, gimple_asm_clobber_op (gs, i), |
1107 { | 1226 spc, flags, false); |
1108 if (flags & TDF_RAW) | 1227 if (i < n - 1) |
1109 { | 1228 pp_string (buffer, ", "); |
1110 newline_and_indent (buffer, spc + 2); | 1229 } |
1111 pp_string (buffer, "CLOBBER: "); | 1230 break; |
1112 } | 1231 |
1113 else | 1232 case 3: |
1114 pp_string (buffer, " : "); | 1233 n = gimple_asm_nlabels (gs); |
1115 } | 1234 for (i = 0; i < n; i++) |
1116 | 1235 { |
1117 for (i = 0; i < gimple_asm_nclobbers (gs); i++) | 1236 dump_generic_node (buffer, gimple_asm_label_op (gs, i), |
1118 { | 1237 spc, flags, false); |
1119 dump_generic_node (buffer, gimple_asm_clobber_op (gs, i), spc, flags, | 1238 if (i < n - 1) |
1120 false); | 1239 pp_string (buffer, ", "); |
1121 if ( i < gimple_asm_nclobbers (gs) -1) | 1240 } |
1122 pp_string (buffer, ", "); | 1241 break; |
1123 } | 1242 |
1124 } | 1243 default: |
1125 if (flags & TDF_RAW) | 1244 gcc_unreachable (); |
1126 { | 1245 } |
1127 newline_and_indent (buffer, spc); | 1246 } |
1128 pp_character (buffer, '>'); | 1247 |
1129 } | 1248 pp_string (buffer, ");"); |
1130 else | |
1131 pp_string (buffer, ");"); | |
1132 } | |
1133 | |
1134 | |
1135 /* Dump the set of decls SYMS. BUFFER, SPC and FLAGS are as in | |
1136 dump_generic_node. */ | |
1137 | |
1138 static void | |
1139 dump_symbols (pretty_printer *buffer, bitmap syms, int flags) | |
1140 { | |
1141 unsigned i; | |
1142 bitmap_iterator bi; | |
1143 | |
1144 if (syms == NULL) | |
1145 pp_string (buffer, "NIL"); | |
1146 else | |
1147 { | |
1148 pp_string (buffer, " { "); | |
1149 | |
1150 EXECUTE_IF_SET_IN_BITMAP (syms, 0, i, bi) | |
1151 { | |
1152 tree sym = referenced_var_lookup (i); | |
1153 dump_generic_node (buffer, sym, 0, flags, false); | |
1154 pp_character (buffer, ' '); | |
1155 } | |
1156 | |
1157 pp_character (buffer, '}'); | |
1158 } | 1249 } |
1159 } | 1250 } |
1160 | 1251 |
1161 | 1252 |
1162 /* Dump a PHI node PHI. BUFFER, SPC and FLAGS are as in | 1253 /* Dump a PHI node PHI. BUFFER, SPC and FLAGS are as in |
1175 dump_generic_node (buffer, gimple_phi_result (phi), spc, flags, false); | 1266 dump_generic_node (buffer, gimple_phi_result (phi), spc, flags, false); |
1176 pp_string (buffer, " = PHI <"); | 1267 pp_string (buffer, " = PHI <"); |
1177 } | 1268 } |
1178 for (i = 0; i < gimple_phi_num_args (phi); i++) | 1269 for (i = 0; i < gimple_phi_num_args (phi); i++) |
1179 { | 1270 { |
1271 if ((flags & TDF_LINENO) && gimple_phi_arg_has_location (phi, i)) | |
1272 { | |
1273 expanded_location xloc; | |
1274 | |
1275 xloc = expand_location (gimple_phi_arg_location (phi, i)); | |
1276 pp_character (buffer, '['); | |
1277 if (xloc.file) | |
1278 { | |
1279 pp_string (buffer, xloc.file); | |
1280 pp_string (buffer, " : "); | |
1281 } | |
1282 pp_decimal_int (buffer, xloc.line); | |
1283 pp_string (buffer, ":"); | |
1284 pp_decimal_int (buffer, xloc.column); | |
1285 pp_string (buffer, "] "); | |
1286 } | |
1180 dump_generic_node (buffer, gimple_phi_arg_def (phi, i), spc, flags, | 1287 dump_generic_node (buffer, gimple_phi_arg_def (phi, i), spc, flags, |
1181 false); | 1288 false); |
1182 pp_character (buffer, '('); | 1289 pp_character (buffer, '('); |
1183 pp_decimal_int (buffer, gimple_phi_arg_edge (phi, i)->src->index); | 1290 pp_decimal_int (buffer, gimple_phi_arg_edge (phi, i)->src->index); |
1184 pp_character (buffer, ')'); | 1291 pp_character (buffer, ')'); |
1349 spc, flags, false); | 1456 spc, flags, false); |
1350 pp_character (buffer, ')'); | 1457 pp_character (buffer, ')'); |
1351 } | 1458 } |
1352 } | 1459 } |
1353 | 1460 |
1354 /* Dump a GIMPLE_CHANGE_DYNAMIC_TYPE statement GS. BUFFER, SPC and | |
1355 FLAGS are as in dump_gimple_stmt. */ | |
1356 | |
1357 static void | |
1358 dump_gimple_cdt (pretty_printer *buffer, gimple gs, int spc, int flags) | |
1359 { | |
1360 if (flags & TDF_RAW) | |
1361 dump_gimple_fmt (buffer, spc, flags, "%G <%T, %T>", gs, | |
1362 gimple_cdt_new_type (gs), gimple_cdt_location (gs)); | |
1363 else | |
1364 { | |
1365 pp_string (buffer, "<<<change_dynamic_type ("); | |
1366 dump_generic_node (buffer, gimple_cdt_new_type (gs), spc + 2, flags, | |
1367 false); | |
1368 pp_string (buffer, ") "); | |
1369 dump_generic_node (buffer, gimple_cdt_location (gs), spc + 2, flags, | |
1370 false); | |
1371 pp_string (buffer, ")>>>"); | |
1372 } | |
1373 } | |
1374 | |
1375 | 1461 |
1376 /* Dump all the memory operands for statement GS. BUFFER, SPC and | 1462 /* Dump all the memory operands for statement GS. BUFFER, SPC and |
1377 FLAGS are as in dump_gimple_stmt. */ | 1463 FLAGS are as in dump_gimple_stmt. */ |
1378 | 1464 |
1379 static void | 1465 static void |
1380 dump_gimple_mem_ops (pretty_printer *buffer, gimple gs, int spc, int flags) | 1466 dump_gimple_mem_ops (pretty_printer *buffer, gimple gs, int spc, int flags) |
1381 { | 1467 { |
1382 struct voptype_d *vdefs; | 1468 tree vdef = gimple_vdef (gs); |
1383 struct voptype_d *vuses; | 1469 tree vuse = gimple_vuse (gs); |
1384 int i, n; | |
1385 | 1470 |
1386 if (!ssa_operands_active () || !gimple_references_memory_p (gs)) | 1471 if (!ssa_operands_active () || !gimple_references_memory_p (gs)) |
1387 return; | 1472 return; |
1388 | 1473 |
1389 /* Even if the statement doesn't have virtual operators yet, it may | 1474 if (vdef != NULL_TREE) |
1390 contain symbol information (this happens before aliases have been | 1475 { |
1391 computed). */ | 1476 pp_string (buffer, "# "); |
1392 if ((flags & TDF_MEMSYMS) | 1477 dump_generic_node (buffer, vdef, spc + 2, flags, false); |
1393 && gimple_vuse_ops (gs) == NULL | 1478 pp_string (buffer, " = VDEF <"); |
1394 && gimple_vdef_ops (gs) == NULL) | 1479 dump_generic_node (buffer, vuse, spc + 2, flags, false); |
1395 { | 1480 pp_character (buffer, '>'); |
1396 if (gimple_loaded_syms (gs)) | 1481 newline_and_indent (buffer, spc); |
1397 { | 1482 } |
1398 pp_string (buffer, "# LOADS: "); | 1483 else if (vuse != NULL_TREE) |
1399 dump_symbols (buffer, gimple_loaded_syms (gs), flags); | |
1400 newline_and_indent (buffer, spc); | |
1401 } | |
1402 | |
1403 if (gimple_stored_syms (gs)) | |
1404 { | |
1405 pp_string (buffer, "# STORES: "); | |
1406 dump_symbols (buffer, gimple_stored_syms (gs), flags); | |
1407 newline_and_indent (buffer, spc); | |
1408 } | |
1409 | |
1410 return; | |
1411 } | |
1412 | |
1413 vuses = gimple_vuse_ops (gs); | |
1414 while (vuses) | |
1415 { | 1484 { |
1416 pp_string (buffer, "# VUSE <"); | 1485 pp_string (buffer, "# VUSE <"); |
1417 | 1486 dump_generic_node (buffer, vuse, spc + 2, flags, false); |
1418 n = VUSE_NUM (vuses); | |
1419 for (i = 0; i < n; i++) | |
1420 { | |
1421 dump_generic_node (buffer, VUSE_OP (vuses, i), spc + 2, flags, false); | |
1422 if (i < n - 1) | |
1423 pp_string (buffer, ", "); | |
1424 } | |
1425 | |
1426 pp_character (buffer, '>'); | 1487 pp_character (buffer, '>'); |
1427 | |
1428 if (flags & TDF_MEMSYMS) | |
1429 dump_symbols (buffer, gimple_loaded_syms (gs), flags); | |
1430 | |
1431 newline_and_indent (buffer, spc); | 1488 newline_and_indent (buffer, spc); |
1432 vuses = vuses->next; | |
1433 } | |
1434 | |
1435 vdefs = gimple_vdef_ops (gs); | |
1436 while (vdefs) | |
1437 { | |
1438 pp_string (buffer, "# "); | |
1439 dump_generic_node (buffer, VDEF_RESULT (vdefs), spc + 2, flags, false); | |
1440 pp_string (buffer, " = VDEF <"); | |
1441 | |
1442 n = VDEF_NUM (vdefs); | |
1443 for (i = 0; i < n; i++) | |
1444 { | |
1445 dump_generic_node (buffer, VDEF_OP (vdefs, i), spc + 2, flags, 0); | |
1446 if (i < n - 1) | |
1447 pp_string (buffer, ", "); | |
1448 } | |
1449 | |
1450 pp_character (buffer, '>'); | |
1451 | |
1452 if ((flags & TDF_MEMSYMS) && vdefs->next == NULL) | |
1453 dump_symbols (buffer, gimple_stored_syms (gs), flags); | |
1454 | |
1455 newline_and_indent (buffer, spc); | |
1456 vdefs = vdefs->next; | |
1457 } | 1489 } |
1458 } | 1490 } |
1459 | 1491 |
1460 | 1492 |
1461 /* Dump the gimple statement GS on the pretty printer BUFFER, SPC | 1493 /* Dump the gimple statement GS on the pretty printer BUFFER, SPC |
1479 { | 1511 { |
1480 pp_string (buffer, xloc.file); | 1512 pp_string (buffer, xloc.file); |
1481 pp_string (buffer, " : "); | 1513 pp_string (buffer, " : "); |
1482 } | 1514 } |
1483 pp_decimal_int (buffer, xloc.line); | 1515 pp_decimal_int (buffer, xloc.line); |
1516 pp_string (buffer, ":"); | |
1517 pp_decimal_int (buffer, xloc.column); | |
1484 pp_string (buffer, "] "); | 1518 pp_string (buffer, "] "); |
1519 } | |
1520 | |
1521 if (flags & TDF_EH) | |
1522 { | |
1523 int lp_nr = lookup_stmt_eh_lp (gs); | |
1524 if (lp_nr > 0) | |
1525 pp_printf (buffer, "[LP %d] ", lp_nr); | |
1526 else if (lp_nr < 0) | |
1527 pp_printf (buffer, "[MNT %d] ", -lp_nr); | |
1485 } | 1528 } |
1486 | 1529 |
1487 if ((flags & (TDF_VOPS|TDF_MEMSYMS)) | 1530 if ((flags & (TDF_VOPS|TDF_MEMSYMS)) |
1488 && gimple_has_mem_ops (gs)) | 1531 && gimple_has_mem_ops (gs)) |
1489 dump_gimple_mem_ops (buffer, gs, spc, flags); | 1532 dump_gimple_mem_ops (buffer, gs, spc, flags); |
1587 | 1630 |
1588 case GIMPLE_OMP_CRITICAL: | 1631 case GIMPLE_OMP_CRITICAL: |
1589 dump_gimple_omp_critical (buffer, gs, spc, flags); | 1632 dump_gimple_omp_critical (buffer, gs, spc, flags); |
1590 break; | 1633 break; |
1591 | 1634 |
1592 case GIMPLE_CHANGE_DYNAMIC_TYPE: | |
1593 dump_gimple_cdt (buffer, gs, spc, flags); | |
1594 break; | |
1595 | |
1596 case GIMPLE_CATCH: | 1635 case GIMPLE_CATCH: |
1597 dump_gimple_catch (buffer, gs, spc, flags); | 1636 dump_gimple_catch (buffer, gs, spc, flags); |
1598 break; | 1637 break; |
1599 | 1638 |
1600 case GIMPLE_EH_FILTER: | 1639 case GIMPLE_EH_FILTER: |
1601 dump_gimple_eh_filter (buffer, gs, spc, flags); | 1640 dump_gimple_eh_filter (buffer, gs, spc, flags); |
1602 break; | 1641 break; |
1603 | 1642 |
1643 case GIMPLE_EH_MUST_NOT_THROW: | |
1644 dump_gimple_eh_must_not_throw (buffer, gs, spc, flags); | |
1645 break; | |
1646 | |
1604 case GIMPLE_RESX: | 1647 case GIMPLE_RESX: |
1605 dump_gimple_resx (buffer, gs, spc, flags); | 1648 dump_gimple_resx (buffer, gs, spc, flags); |
1649 break; | |
1650 | |
1651 case GIMPLE_EH_DISPATCH: | |
1652 dump_gimple_eh_dispatch (buffer, gs, spc, flags); | |
1653 break; | |
1654 | |
1655 case GIMPLE_DEBUG: | |
1656 dump_gimple_debug (buffer, gs, spc, flags); | |
1606 break; | 1657 break; |
1607 | 1658 |
1608 case GIMPLE_PREDICT: | 1659 case GIMPLE_PREDICT: |
1609 pp_string (buffer, "// predicted "); | 1660 pp_string (buffer, "// predicted "); |
1610 if (gimple_predict_outcome (gs)) | 1661 if (gimple_predict_outcome (gs)) |
1656 if (flags & TDF_LINENO) | 1707 if (flags & TDF_LINENO) |
1657 { | 1708 { |
1658 gimple_stmt_iterator gsi; | 1709 gimple_stmt_iterator gsi; |
1659 | 1710 |
1660 for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) | 1711 for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) |
1661 if (get_lineno (gsi_stmt (gsi)) != -1) | 1712 if (!is_gimple_debug (gsi_stmt (gsi)) |
1713 && get_lineno (gsi_stmt (gsi)) != UNKNOWN_LOCATION) | |
1662 { | 1714 { |
1663 pp_string (buffer, ", starting at line "); | 1715 pp_string (buffer, ", starting at line "); |
1664 pp_decimal_int (buffer, get_lineno (gsi_stmt (gsi))); | 1716 pp_decimal_int (buffer, get_lineno (gsi_stmt (gsi))); |
1665 break; | 1717 break; |
1666 } | 1718 } |
1719 | |
1720 if (bb->discriminator) | |
1721 { | |
1722 pp_string (buffer, ", discriminator "); | |
1723 pp_decimal_int (buffer, bb->discriminator); | |
1724 } | |
1667 } | 1725 } |
1668 newline_and_indent (buffer, indent); | 1726 newline_and_indent (buffer, indent); |
1669 | 1727 |
1670 pp_string (buffer, "# PRED:"); | 1728 pp_string (buffer, "# PRED:"); |
1671 pp_write_text_to_stream (buffer); | 1729 pp_write_text_to_stream (buffer); |
1828 { | 1886 { |
1829 pp_string (buffer, goto_xloc.file); | 1887 pp_string (buffer, goto_xloc.file); |
1830 pp_string (buffer, " : "); | 1888 pp_string (buffer, " : "); |
1831 } | 1889 } |
1832 pp_decimal_int (buffer, goto_xloc.line); | 1890 pp_decimal_int (buffer, goto_xloc.line); |
1891 pp_string (buffer, " : "); | |
1892 pp_decimal_int (buffer, goto_xloc.column); | |
1833 pp_string (buffer, "] "); | 1893 pp_string (buffer, "] "); |
1834 } | 1894 } |
1835 | 1895 |
1836 pp_cfg_jump (buffer, e->dest); | 1896 pp_cfg_jump (buffer, e->dest); |
1837 pp_newline (buffer); | 1897 pp_newline (buffer); |