On Mon, 25 Sep 2017, Martin Jambor wrote:
> --- a/gcc/tree-sra.c
> +++ b/gcc/tree-sra.c
> @@ -1542,19 +1542,20 @@ compare_access_positions (const void *a, const void 
> *b)
>              && TREE_CODE (f2->type) != COMPLEX_TYPE
>              && TREE_CODE (f2->type) != VECTOR_TYPE)
>       return -1;
> -      /* Put the integral type with the bigger precision first.  */
> +      /* Put any integral type before any non-integral type.  When splicing, 
> we
> +      make sure that those with insufficient precision and occupupying the

Typo (s/upup/up).

> @@ -2102,6 +2106,21 @@ sort_and_splice_var_accesses (tree var)
>            this combination of size and offset, the comparison function
>            should have put the scalars first.  */
>         gcc_assert (first_scalar || !is_gimple_reg_type (ac2->type));
> +       /* It also prefers integral types to non-integral.  However, when the
> +          precision of the selected type does not span the entire area and
> +          should also be used for a non-integer (i.e. float), we must not
> +          let that happen.  */
> +       if (non_full_precision && !INTEGRAL_TYPE_P (ac2->type))
> +         {
> +           if (dump_file && (dump_flags & TDF_DETAILS))
> +             {
> +               fprintf (dump_file, "Cannot sclarize the following access "

Typo ('scalarize').

Thanks!  If this is resolved, haifa-sched autoprefetch ranking will become the
last remaining (among discovered so far) inconsistent qsort comparator in GCC.

Alexander

Reply via email to