https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63679

--- Comment #39 from alalaw01 at gcc dot gnu.org ---
Author: alalaw01
Date: Mon Jan 18 12:29:02 2016
New Revision: 232506

URL: https://gcc.gnu.org/viewcvs?rev=232506&root=gcc&view=rev
Log:
Make SRA scalarize constant-pool loads

PR target/63679

gcc/ChangeLog:

        * tree-sra.c (disqualified_constants, constant_decl_p): New.
        (sra_initialize): Allocate disqualified_constants.
        (sra_deinitialize): Free disqualified_constants.
        (disqualify_candidate): Update disqualified_constants when appropriate.
        (create_access): Scan for constant-pool entries as we go along.
        (scalarizable_type_p): Add check against type_contains_placeholder_p.
        (maybe_add_sra_candidate): Allow constant-pool entries.
        (load_assign_lhs_subreplacements): Bind debug for constant pool vars.
        (initialize_constant_pool_replacements): New.
        (sra_modify_assign): Avoid mangling assignments created by previous,
        and don't generate writes into constant pool.
        (sra_modify_function_body): Call initialize_constant_pool_replacements.

gcc/testsuite/:

        * gcc.dg/tree-ssa/sra-17.c: New.
        * gcc.dg/tree-ssa/sra-18.c: New.

Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/sra-17.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/sra-18.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-sra.c

Reply via email to