On 24/12/15 11:53, Alan Lawrence wrote:
Here's a new version that fixes the gcc.dg/guality/pr54970.c failures seen on
aarch64 and powerpc64.
[snip]
This also fixes a bunch of other guality tests on AArch64 that were failing
prior to the patch series, and another bunch on PowerPC64 (bigendian -m32),
listed below.
Ach, sorry, not quite. That version avoids any regressions (e.g. in pr54970.c),
but does not fix all those other tests, unless you also have this hunk
(https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01483.html):
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index a3ff2df..2a741b8 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -2651,7 +2651,8 @@ analyze_all_variable_accesses (void)
&& scalarizable_type_p (TREE_TYPE (var)))
{
if (tree_to_uhwi (TYPE_SIZE (TREE_TYPE (var)))
- <= max_scalarization_size)
+ <= max_scalarization_size
+ || DECL_IN_CONSTANT_POOL (var))
{
create_total_scalarization_access (var);
completely_scalarize (var, TREE_TYPE (var), 0, var);
...which I was using to increase test coverage of the SRA changes.
(Alternatively, you can "fix" the tests by running the testsuite with a forced
--param sra-max-scalarization-size. But this is only saying that the dwarf info
now generated by scalarizing constant-pools, is better than whatever dwarf was
being generated by whatever other part of the compiler before.)
--Alan