diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2013-09-24 15:57:00 +0000 |
---|---|---|
committer | Christophe Lyon <clyon@gcc.gnu.org> | 2013-09-24 17:57:00 +0200 |
commit | 0498471be6e90c14f3fdf42789117bae39868f2b (patch) | |
tree | 561848f23b0bceeb7edb8e9b5b7a5d8bcb965f2d /gcc | |
parent | 5a8c2b571c68cea56cab84c90bf407363c8a3587 (diff) | |
download | gcc-0498471be6e90c14f3fdf42789117bae39868f2b.zip gcc-0498471be6e90c14f3fdf42789117bae39868f2b.tar.gz gcc-0498471be6e90c14f3fdf42789117bae39868f2b.tar.bz2 |
gimple-pretty-print.c: Various whitespace tweaks.
2013-09-24 Christophe Lyon <christophe.lyon@linaro.org>
* gimple-pretty-print.c: Various whitespace tweaks.
* tree-core.h: Likewise.
* tree-pretty-print.c: Likewise.
* tree-ssa-alias.c: Likewise.
* tree-ssa-copy.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-ssanames.h: Likewise.
* tree-vrp.c: Likewise.
From-SVN: r202869
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/gimple-pretty-print.c | 24 | ||||
-rw-r--r-- | gcc/tree-core.h | 2 | ||||
-rw-r--r-- | gcc/tree-pretty-print.c | 20 | ||||
-rw-r--r-- | gcc/tree-ssa-alias.c | 2 | ||||
-rw-r--r-- | gcc/tree-ssa-copy.c | 26 | ||||
-rw-r--r-- | gcc/tree-ssanames.c | 6 | ||||
-rw-r--r-- | gcc/tree-ssanames.h | 2 | ||||
-rw-r--r-- | gcc/tree-vrp.c | 76 |
9 files changed, 90 insertions, 79 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cbd30bd..47c31a0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2013-09-24 Christophe Lyon <christophe.lyon@linaro.org> + + * gimple-pretty-print.c: Various whitespace tweaks. + * tree-core.h: Likewise. + * tree-pretty-print.c: Likewise. + * tree-ssa-alias.c: Likewise. + * tree-ssa-copy.c: Likewise. + * tree-ssanames.c: Likewise. + * tree-ssanames.h: Likewise. + * tree-vrp.c: Likewise. + 2013-09-24 Alan Modra <amodra@gmail.com> PR middle-end/57134 diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c index bc01bea..1599c80 100644 --- a/gcc/gimple-pretty-print.c +++ b/gcc/gimple-pretty-print.c @@ -1632,17 +1632,17 @@ dump_ssaname_info (pretty_printer *buffer, tree node, int spc) value_range_type range_type = get_range_info (node, &min, &max); if (range_type == VR_VARYING) - pp_printf (buffer, "# RANGE VR_VARYING"); + pp_printf (buffer, "# RANGE VR_VARYING"); else if (range_type == VR_RANGE || range_type == VR_ANTI_RANGE) - { - pp_printf (buffer, "# RANGE "); - pp_printf (buffer, "%s[", range_type == VR_RANGE ? "" : "~"); - pp_double_int (buffer, min, TYPE_UNSIGNED (TREE_TYPE (node))); - pp_printf (buffer, ", "); - pp_double_int (buffer, max, TYPE_UNSIGNED (TREE_TYPE (node))); - pp_printf (buffer, "]"); - newline_and_indent (buffer, spc); - } + { + pp_printf (buffer, "# RANGE "); + pp_printf (buffer, "%s[", range_type == VR_RANGE ? "" : "~"); + pp_double_int (buffer, min, TYPE_UNSIGNED (TREE_TYPE (node))); + pp_printf (buffer, ", "); + pp_double_int (buffer, max, TYPE_UNSIGNED (TREE_TYPE (node))); + pp_printf (buffer, "]"); + newline_and_indent (buffer, spc); + } } } @@ -1661,8 +1661,8 @@ dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, int flags) dump_ssaname_info (buffer, lhs, spc); if (flags & TDF_RAW) - dump_gimple_fmt (buffer, spc, flags, "%G <%T, ", phi, - gimple_phi_result (phi)); + dump_gimple_fmt (buffer, spc, flags, "%G <%T, ", phi, + gimple_phi_result (phi)); else { dump_generic_node (buffer, lhs, spc, flags, false); diff --git a/gcc/tree-core.h b/gcc/tree-core.h index 2acc379..0b3314b 100644 --- a/gcc/tree-core.h +++ b/gcc/tree-core.h @@ -1058,7 +1058,7 @@ struct GTY(()) tree_ssa_name { /* Value range attributes used for zero/sign extension elimination. */ struct GTY ((tag ("1"))) range_info_def *range_info; } GTY ((desc ("%1.typed.type ?" \ - "!POINTER_TYPE_P (TREE_TYPE ((tree)&%1)) : 2"))) info; + "!POINTER_TYPE_P (TREE_TYPE ((tree)&%1)) : 2"))) info; /* Immediate uses list for this SSA_NAME. */ struct ssa_use_operand_d imm_uses; diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index a5f9a71..bd6fd81 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -1063,8 +1063,8 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, pp_string (buffer, "B"); /* pseudo-unit */ } else - pp_double_int (buffer, tree_to_double_int (node), - TYPE_UNSIGNED (TREE_TYPE (node))); + pp_double_int (buffer, tree_to_double_int (node), + TYPE_UNSIGNED (TREE_TYPE (node))); break; case REAL_CST: @@ -3191,16 +3191,16 @@ pp_double_int (pretty_printer *pp, double_int d, bool uns) unsigned HOST_WIDE_INT low = d.low; HOST_WIDE_INT high = d.high; if (!uns && d.is_negative ()) - { - pp_minus (pp); - high = ~high + !low; - low = -low; - } + { + pp_minus (pp); + high = ~high + !low; + low = -low; + } /* Would "%x%0*x" or "%x%*0x" get zero-padding on all - systems? */ + systems? */ sprintf (pp_buffer (pp)->digit_buffer, - HOST_WIDE_INT_PRINT_DOUBLE_HEX, - (unsigned HOST_WIDE_INT) high, low); + HOST_WIDE_INT_PRINT_DOUBLE_HEX, + (unsigned HOST_WIDE_INT) high, low); pp_string (pp, pp_buffer (pp)->digit_buffer); } } diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 0ef7401..0d3c15c 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -404,7 +404,7 @@ dump_alias_info (FILE *file) struct ptr_info_def *pi; if (ptr == NULL_TREE - || !POINTER_TYPE_P (TREE_TYPE (ptr)) + || !POINTER_TYPE_P (TREE_TYPE (ptr)) || SSA_NAME_IN_FREE_LIST (ptr)) continue; diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c index 25a43ff..2172a9a 100644 --- a/gcc/tree-ssa-copy.c +++ b/gcc/tree-ssa-copy.c @@ -767,19 +767,19 @@ fini_copy_prop (void) of the representative to the first solution we find if it doesn't have one already. */ if (copy_of[i].value != var - && TREE_CODE (copy_of[i].value) == SSA_NAME) - { - if (POINTER_TYPE_P (TREE_TYPE (var)) - && SSA_NAME_PTR_INFO (var) - && !SSA_NAME_PTR_INFO (copy_of[i].value)) - duplicate_ssa_name_ptr_info (copy_of[i].value, - SSA_NAME_PTR_INFO (var)); - else if (!POINTER_TYPE_P (TREE_TYPE (var)) - && SSA_NAME_RANGE_INFO (var) - && !SSA_NAME_RANGE_INFO (copy_of[i].value)) - duplicate_ssa_name_range_info (copy_of[i].value, - SSA_NAME_RANGE_INFO (var)); - } + && TREE_CODE (copy_of[i].value) == SSA_NAME) + { + if (POINTER_TYPE_P (TREE_TYPE (var)) + && SSA_NAME_PTR_INFO (var) + && !SSA_NAME_PTR_INFO (copy_of[i].value)) + duplicate_ssa_name_ptr_info (copy_of[i].value, + SSA_NAME_PTR_INFO (var)); + else if (!POINTER_TYPE_P (TREE_TYPE (var)) + && SSA_NAME_RANGE_INFO (var) + && !SSA_NAME_RANGE_INFO (copy_of[i].value)) + duplicate_ssa_name_range_info (copy_of[i].value, + SSA_NAME_RANGE_INFO (var)); + } } /* Don't do DCE if SCEV is initialized. It would destroy the scev cache. */ diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index 1a70f16..d54d8c9 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -206,7 +206,7 @@ get_range_info (tree name, double_int *min, double_int *max) /* Return VR_VARYING for SSA_NAMEs with NULL RANGE_INFO or SSA_NAMEs with integral types width > 2 * HOST_BITS_PER_WIDE_INT precision. */ if (!ri || (GET_MODE_PRECISION (TYPE_MODE (TREE_TYPE (name))) - > 2 * HOST_BITS_PER_WIDE_INT)) + > 2 * HOST_BITS_PER_WIDE_INT)) return VR_VARYING; /* If min > max, it is VR_ANTI_RANGE. */ @@ -455,14 +455,14 @@ duplicate_ssa_name_fn (struct function *fn, tree name, gimple stmt) struct ptr_info_def *old_ptr_info = SSA_NAME_PTR_INFO (name); if (old_ptr_info) - duplicate_ssa_name_ptr_info (new_name, old_ptr_info); + duplicate_ssa_name_ptr_info (new_name, old_ptr_info); } else { struct range_info_def *old_range_info = SSA_NAME_RANGE_INFO (name); if (old_range_info) - duplicate_ssa_name_range_info (new_name, old_range_info); + duplicate_ssa_name_range_info (new_name, old_range_info); } return new_name; diff --git a/gcc/tree-ssanames.h b/gcc/tree-ssanames.h index 5239bc3..f80e0b2 100644 --- a/gcc/tree-ssanames.h +++ b/gcc/tree-ssanames.h @@ -71,7 +71,7 @@ enum value_range_type { VR_UNDEFINED, VR_RANGE, VR_ANTI_RANGE, VR_VARYING }; extern void set_range_info (tree ssa, double_int min, double_int max); /* Gets the value range from SSA. */ extern enum value_range_type get_range_info (tree name, double_int *min, - double_int *max); + double_int *max); extern void init_ssanames (struct function *, int); extern void fini_ssanames (void); extern void ssanames_print_statistics (void); diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 7926d53..0d50af7 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -9451,48 +9451,48 @@ vrp_finalize (void) /* Set value range to non pointer SSA_NAMEs. */ for (i = 0; i < num_vr_values; i++) - if (vr_value[i]) - { - tree name = ssa_name (i); + if (vr_value[i]) + { + tree name = ssa_name (i); if (!name || POINTER_TYPE_P (TREE_TYPE (name)) - || (vr_value[i]->type == VR_VARYING) - || (vr_value[i]->type == VR_UNDEFINED)) - continue; + || (vr_value[i]->type == VR_VARYING) + || (vr_value[i]->type == VR_UNDEFINED)) + continue; - if ((TREE_CODE (vr_value[i]->min) == INTEGER_CST) - && (TREE_CODE (vr_value[i]->max) == INTEGER_CST)) - { - if (vr_value[i]->type == VR_RANGE) - set_range_info (name, - tree_to_double_int (vr_value[i]->min), - tree_to_double_int (vr_value[i]->max)); - else if (vr_value[i]->type == VR_ANTI_RANGE) - { - /* VR_ANTI_RANGE ~[min, max] is encoded compactly as - [max + 1, min - 1] without additional attributes. - When min value > max value, we know that it is - VR_ANTI_RANGE; it is VR_RANGE otherwise. */ - - /* ~[0,0] anti-range is represented as - range. */ - if (TYPE_UNSIGNED (TREE_TYPE (name)) - && integer_zerop (vr_value[i]->min) - && integer_zerop (vr_value[i]->max)) - set_range_info (name, - double_int_one, - double_int::max_value - (TYPE_PRECISION (TREE_TYPE (name)), true)); - else - set_range_info (name, - tree_to_double_int (vr_value[i]->max) - + double_int_one, - tree_to_double_int (vr_value[i]->min) - - double_int_one); - } - } - } + if ((TREE_CODE (vr_value[i]->min) == INTEGER_CST) + && (TREE_CODE (vr_value[i]->max) == INTEGER_CST)) + { + if (vr_value[i]->type == VR_RANGE) + set_range_info (name, + tree_to_double_int (vr_value[i]->min), + tree_to_double_int (vr_value[i]->max)); + else if (vr_value[i]->type == VR_ANTI_RANGE) + { + /* VR_ANTI_RANGE ~[min, max] is encoded compactly as + [max + 1, min - 1] without additional attributes. + When min value > max value, we know that it is + VR_ANTI_RANGE; it is VR_RANGE otherwise. */ + + /* ~[0,0] anti-range is represented as + range. */ + if (TYPE_UNSIGNED (TREE_TYPE (name)) + && integer_zerop (vr_value[i]->min) + && integer_zerop (vr_value[i]->max)) + set_range_info (name, + double_int_one, + double_int::max_value + (TYPE_PRECISION (TREE_TYPE (name)), true)); + else + set_range_info (name, + tree_to_double_int (vr_value[i]->max) + + double_int_one, + tree_to_double_int (vr_value[i]->min) + - double_int_one); + } + } + } /* Free allocated memory. */ for (i = 0; i < num_vr_values; i++) |