Commit 0498471b by Christophe Lyon Committed by Christophe Lyon

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
parent 5a8c2b57
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> 2013-09-24 Alan Modra <amodra@gmail.com>
PR middle-end/57134 PR middle-end/57134
......
...@@ -1632,17 +1632,17 @@ dump_ssaname_info (pretty_printer *buffer, tree node, int spc) ...@@ -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); value_range_type range_type = get_range_info (node, &min, &max);
if (range_type == VR_VARYING) 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) else if (range_type == VR_RANGE || range_type == VR_ANTI_RANGE)
{ {
pp_printf (buffer, "# RANGE "); pp_printf (buffer, "# RANGE ");
pp_printf (buffer, "%s[", range_type == VR_RANGE ? "" : "~"); pp_printf (buffer, "%s[", range_type == VR_RANGE ? "" : "~");
pp_double_int (buffer, min, TYPE_UNSIGNED (TREE_TYPE (node))); pp_double_int (buffer, min, TYPE_UNSIGNED (TREE_TYPE (node)));
pp_printf (buffer, ", "); pp_printf (buffer, ", ");
pp_double_int (buffer, max, TYPE_UNSIGNED (TREE_TYPE (node))); pp_double_int (buffer, max, TYPE_UNSIGNED (TREE_TYPE (node)));
pp_printf (buffer, "]"); pp_printf (buffer, "]");
newline_and_indent (buffer, spc); newline_and_indent (buffer, spc);
} }
} }
} }
...@@ -1661,8 +1661,8 @@ dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, int flags) ...@@ -1661,8 +1661,8 @@ dump_gimple_phi (pretty_printer *buffer, gimple phi, int spc, int flags)
dump_ssaname_info (buffer, lhs, spc); dump_ssaname_info (buffer, lhs, spc);
if (flags & TDF_RAW) if (flags & TDF_RAW)
dump_gimple_fmt (buffer, spc, flags, "%G <%T, ", phi, dump_gimple_fmt (buffer, spc, flags, "%G <%T, ", phi,
gimple_phi_result (phi)); gimple_phi_result (phi));
else else
{ {
dump_generic_node (buffer, lhs, spc, flags, false); dump_generic_node (buffer, lhs, spc, flags, false);
......
...@@ -1058,7 +1058,7 @@ struct GTY(()) tree_ssa_name { ...@@ -1058,7 +1058,7 @@ struct GTY(()) tree_ssa_name {
/* Value range attributes used for zero/sign extension elimination. */ /* Value range attributes used for zero/sign extension elimination. */
struct GTY ((tag ("1"))) range_info_def *range_info; struct GTY ((tag ("1"))) range_info_def *range_info;
} GTY ((desc ("%1.typed.type ?" \ } 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. */ /* Immediate uses list for this SSA_NAME. */
struct ssa_use_operand_d imm_uses; struct ssa_use_operand_d imm_uses;
......
...@@ -1063,8 +1063,8 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, ...@@ -1063,8 +1063,8 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
pp_string (buffer, "B"); /* pseudo-unit */ pp_string (buffer, "B"); /* pseudo-unit */
} }
else else
pp_double_int (buffer, tree_to_double_int (node), pp_double_int (buffer, tree_to_double_int (node),
TYPE_UNSIGNED (TREE_TYPE (node))); TYPE_UNSIGNED (TREE_TYPE (node)));
break; break;
case REAL_CST: case REAL_CST:
...@@ -3191,16 +3191,16 @@ pp_double_int (pretty_printer *pp, double_int d, bool uns) ...@@ -3191,16 +3191,16 @@ pp_double_int (pretty_printer *pp, double_int d, bool uns)
unsigned HOST_WIDE_INT low = d.low; unsigned HOST_WIDE_INT low = d.low;
HOST_WIDE_INT high = d.high; HOST_WIDE_INT high = d.high;
if (!uns && d.is_negative ()) if (!uns && d.is_negative ())
{ {
pp_minus (pp); pp_minus (pp);
high = ~high + !low; high = ~high + !low;
low = -low; low = -low;
} }
/* Would "%x%0*x" or "%x%*0x" get zero-padding on all /* Would "%x%0*x" or "%x%*0x" get zero-padding on all
systems? */ systems? */
sprintf (pp_buffer (pp)->digit_buffer, sprintf (pp_buffer (pp)->digit_buffer,
HOST_WIDE_INT_PRINT_DOUBLE_HEX, HOST_WIDE_INT_PRINT_DOUBLE_HEX,
(unsigned HOST_WIDE_INT) high, low); (unsigned HOST_WIDE_INT) high, low);
pp_string (pp, pp_buffer (pp)->digit_buffer); pp_string (pp, pp_buffer (pp)->digit_buffer);
} }
} }
...@@ -404,7 +404,7 @@ dump_alias_info (FILE *file) ...@@ -404,7 +404,7 @@ dump_alias_info (FILE *file)
struct ptr_info_def *pi; struct ptr_info_def *pi;
if (ptr == NULL_TREE if (ptr == NULL_TREE
|| !POINTER_TYPE_P (TREE_TYPE (ptr)) || !POINTER_TYPE_P (TREE_TYPE (ptr))
|| SSA_NAME_IN_FREE_LIST (ptr)) || SSA_NAME_IN_FREE_LIST (ptr))
continue; continue;
......
...@@ -767,19 +767,19 @@ fini_copy_prop (void) ...@@ -767,19 +767,19 @@ fini_copy_prop (void)
of the representative to the first solution we find if of the representative to the first solution we find if
it doesn't have one already. */ it doesn't have one already. */
if (copy_of[i].value != var if (copy_of[i].value != var
&& TREE_CODE (copy_of[i].value) == SSA_NAME) && TREE_CODE (copy_of[i].value) == SSA_NAME)
{ {
if (POINTER_TYPE_P (TREE_TYPE (var)) if (POINTER_TYPE_P (TREE_TYPE (var))
&& SSA_NAME_PTR_INFO (var) && SSA_NAME_PTR_INFO (var)
&& !SSA_NAME_PTR_INFO (copy_of[i].value)) && !SSA_NAME_PTR_INFO (copy_of[i].value))
duplicate_ssa_name_ptr_info (copy_of[i].value, duplicate_ssa_name_ptr_info (copy_of[i].value,
SSA_NAME_PTR_INFO (var)); SSA_NAME_PTR_INFO (var));
else if (!POINTER_TYPE_P (TREE_TYPE (var)) else if (!POINTER_TYPE_P (TREE_TYPE (var))
&& SSA_NAME_RANGE_INFO (var) && SSA_NAME_RANGE_INFO (var)
&& !SSA_NAME_RANGE_INFO (copy_of[i].value)) && !SSA_NAME_RANGE_INFO (copy_of[i].value))
duplicate_ssa_name_range_info (copy_of[i].value, duplicate_ssa_name_range_info (copy_of[i].value,
SSA_NAME_RANGE_INFO (var)); SSA_NAME_RANGE_INFO (var));
} }
} }
/* Don't do DCE if SCEV is initialized. It would destroy the scev cache. */ /* Don't do DCE if SCEV is initialized. It would destroy the scev cache. */
......
...@@ -206,7 +206,7 @@ get_range_info (tree name, double_int *min, double_int *max) ...@@ -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 /* Return VR_VARYING for SSA_NAMEs with NULL RANGE_INFO or SSA_NAMEs
with integral types width > 2 * HOST_BITS_PER_WIDE_INT precision. */ with integral types width > 2 * HOST_BITS_PER_WIDE_INT precision. */
if (!ri || (GET_MODE_PRECISION (TYPE_MODE (TREE_TYPE (name))) 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; return VR_VARYING;
/* If min > max, it is VR_ANTI_RANGE. */ /* If min > max, it is VR_ANTI_RANGE. */
...@@ -455,14 +455,14 @@ duplicate_ssa_name_fn (struct function *fn, tree name, gimple stmt) ...@@ -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); struct ptr_info_def *old_ptr_info = SSA_NAME_PTR_INFO (name);
if (old_ptr_info) 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 else
{ {
struct range_info_def *old_range_info = SSA_NAME_RANGE_INFO (name); struct range_info_def *old_range_info = SSA_NAME_RANGE_INFO (name);
if (old_range_info) 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; return new_name;
......
...@@ -71,7 +71,7 @@ enum value_range_type { VR_UNDEFINED, VR_RANGE, VR_ANTI_RANGE, VR_VARYING }; ...@@ -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); extern void set_range_info (tree ssa, double_int min, double_int max);
/* Gets the value range from SSA. */ /* Gets the value range from SSA. */
extern enum value_range_type get_range_info (tree name, double_int *min, 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 init_ssanames (struct function *, int);
extern void fini_ssanames (void); extern void fini_ssanames (void);
extern void ssanames_print_statistics (void); extern void ssanames_print_statistics (void);
......
...@@ -9451,48 +9451,48 @@ vrp_finalize (void) ...@@ -9451,48 +9451,48 @@ vrp_finalize (void)
/* Set value range to non pointer SSA_NAMEs. */ /* Set value range to non pointer SSA_NAMEs. */
for (i = 0; i < num_vr_values; i++) for (i = 0; i < num_vr_values; i++)
if (vr_value[i]) if (vr_value[i])
{ {
tree name = ssa_name (i); tree name = ssa_name (i);
if (!name if (!name
|| POINTER_TYPE_P (TREE_TYPE (name)) || POINTER_TYPE_P (TREE_TYPE (name))
|| (vr_value[i]->type == VR_VARYING) || (vr_value[i]->type == VR_VARYING)
|| (vr_value[i]->type == VR_UNDEFINED)) || (vr_value[i]->type == VR_UNDEFINED))
continue; continue;
if ((TREE_CODE (vr_value[i]->min) == INTEGER_CST) if ((TREE_CODE (vr_value[i]->min) == INTEGER_CST)
&& (TREE_CODE (vr_value[i]->max) == INTEGER_CST)) && (TREE_CODE (vr_value[i]->max) == INTEGER_CST))
{ {
if (vr_value[i]->type == VR_RANGE) if (vr_value[i]->type == VR_RANGE)
set_range_info (name, set_range_info (name,
tree_to_double_int (vr_value[i]->min), tree_to_double_int (vr_value[i]->min),
tree_to_double_int (vr_value[i]->max)); tree_to_double_int (vr_value[i]->max));
else if (vr_value[i]->type == VR_ANTI_RANGE) else if (vr_value[i]->type == VR_ANTI_RANGE)
{ {
/* VR_ANTI_RANGE ~[min, max] is encoded compactly as /* VR_ANTI_RANGE ~[min, max] is encoded compactly as
[max + 1, min - 1] without additional attributes. [max + 1, min - 1] without additional attributes.
When min value > max value, we know that it is When min value > max value, we know that it is
VR_ANTI_RANGE; it is VR_RANGE otherwise. */ VR_ANTI_RANGE; it is VR_RANGE otherwise. */
/* ~[0,0] anti-range is represented as /* ~[0,0] anti-range is represented as
range. */ range. */
if (TYPE_UNSIGNED (TREE_TYPE (name)) if (TYPE_UNSIGNED (TREE_TYPE (name))
&& integer_zerop (vr_value[i]->min) && integer_zerop (vr_value[i]->min)
&& integer_zerop (vr_value[i]->max)) && integer_zerop (vr_value[i]->max))
set_range_info (name, set_range_info (name,
double_int_one, double_int_one,
double_int::max_value double_int::max_value
(TYPE_PRECISION (TREE_TYPE (name)), true)); (TYPE_PRECISION (TREE_TYPE (name)), true));
else else
set_range_info (name, set_range_info (name,
tree_to_double_int (vr_value[i]->max) tree_to_double_int (vr_value[i]->max)
+ double_int_one, + double_int_one,
tree_to_double_int (vr_value[i]->min) tree_to_double_int (vr_value[i]->min)
- double_int_one); - double_int_one);
} }
} }
} }
/* Free allocated memory. */ /* Free allocated memory. */
for (i = 0; i < num_vr_values; i++) for (i = 0; i < num_vr_values; i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment