This is the mail archive of the
mailing list for the GCC project.
r242222 - in /branches/ARM/sve-branch/gcc: doc/...
- From: rsandifo at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Fri, 11 Nov 2016 17:21:52 -0000
- Subject: r242222 - in /branches/ARM/sve-branch/gcc: doc/...
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)
(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)
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.