This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r242222 - in /branches/ARM/sve-branch/gcc: doc/...

Author: rsandifo
Date: Fri Nov 11 17:21:51 2016
New Revision: 242222

Add polynomial rtx constants

This patch adds an rtl representation of poly_int values.
There were two main possible ways of doing this:

(1) Add a new rtl code for the poly_ints themselves.
    This would give constants like:

      (const_poly_int [(const_int c0)
                       (const_int c1)
                       (const_int cn)])

    (although the coefficients could be const_wide_ints instead
    of const_ints where appropriate).  The runtime value would be:

      c0 + c1 * x1 + ... + cn * xn

(2) Add a new rtl code for the polynomial indeterminates,
    then use them in const wrappers.  A constant like c0 + c1 * x1
    would then look like:

      (const:M (plus:M (mult:M (const_param:M x1)
                               (const_int c1))
                       (const_int c0)))

There didn't seem to be that much to choose between them.
However, DWARF location expressions that depend on the SVE
vector length use a pseudo VG register to present the number
of 64-bit values.  This is very similar to the const_param
used in expression (2), and the DWARF expression would use
similar arithmetic operations to construct the full VG-dependent
value.  The patch therefore goes for (2).

Most uses of rtx polynomial constants use helper functions
that abstract the underlying representation, so it would be
easy to change to (1) (or to a different approach) in future.

The simplify_plus_minus hunk deals with cases where the process
of wrapping a value in a const created new rtl.  This happens
for constants like the above since there is no single unique
rtx for every mult operation.  Pointer equality is then no
longer strong enough to detect the looping case.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]