+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
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);
+ }
}
}
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);
/* 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;
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:
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);
}
}
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;
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. */
/* 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. */
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;
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);
/* 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++)