From e923ef4132bd61afa7ca5818281a12ce8fafcdd2 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Fri, 8 Jul 2011 12:16:51 +0200 Subject: [PATCH] tree-sra.c (analyze_all_variable_accesses): Dump that a struture is too big for total scalarization. 2011-07-08 Martin Jambor * tree-sra.c (analyze_all_variable_accesses): Dump that a struture is too big for total scalarization. From-SVN: r176033 --- gcc/ChangeLog | 5 +++++ gcc/tree-sra.c | 20 ++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9c466fef9e4..1bd92cb7d94 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-07-08 Martin Jambor + + * tree-sra.c (analyze_all_variable_accesses): Dump that a struture + is too big for total scalarization. + 2011-07-07 Richard Henderson * config/alpha/elf.h (MIPS_DEBUGGING_INFO): Undef. diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index ca9f316f712..6f784ee6489 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -2312,16 +2312,24 @@ analyze_all_variable_accesses (void) tree var = referenced_var (i); if (TREE_CODE (var) == VAR_DECL - && ((unsigned) tree_low_cst (TYPE_SIZE (TREE_TYPE (var)), 1) - <= max_total_scalarization_size) && type_consists_of_records_p (TREE_TYPE (var))) { - completely_scalarize_var (var); - if (dump_file && (dump_flags & TDF_DETAILS)) + if ((unsigned) tree_low_cst (TYPE_SIZE (TREE_TYPE (var)), 1) + <= max_total_scalarization_size) + { + completely_scalarize_var (var); + if (dump_file && (dump_flags & TDF_DETAILS)) + { + fprintf (dump_file, "Will attempt to totally scalarize "); + print_generic_expr (dump_file, var, 0); + fprintf (dump_file, " (UID: %u): \n", DECL_UID (var)); + } + } + else if (dump_file && (dump_flags & TDF_DETAILS)) { - fprintf (dump_file, "Will attempt to totally scalarize "); + fprintf (dump_file, "Too big to totally scalarize: "); print_generic_expr (dump_file, var, 0); - fprintf (dump_file, " (UID: %u): \n", DECL_UID (var)); + fprintf (dump_file, " (UID: %u)\n", DECL_UID (var)); } } } -- 2.30.2