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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:b58dc0b803057c0e6032e0d9bd92cd834f72c75c

commit r12-248-gb58dc0b803057c0e6032e0d9bd92cd834f72c75c
Author: Richard Biener <rguent...@suse.de>
Date:   Tue Apr 27 14:32:27 2021 +0200

    tree-optimization/99912 - delete trivially dead stmts during DSE

    DSE performs a backwards walk over stmts removing stores but it
    leaves removing resulting dead SSA defs to later passes.  This
    eats into its own alias walking budget if the removed stores kept
    loads live.  The following patch adds removal of trivially dead
    SSA defs which helps in this situation and reduces the amount of
    garbage followup passes need to deal with.

    2021-04-28  Richard Biener  <rguent...@suse.de>

            PR tree-optimization/99912
            * tree-ssa-dse.c (dse_dom_walker::m_need_cfg_cleanup): New.
            (dse_dom_walker::todo): Likewise.
            (dse_dom_walker::dse_optimize_stmt): Move VDEF check to the
            caller.
            (dse_dom_walker::before_dom_children): Remove trivially
            dead SSA defs and schedule CFG cleanup if we removed all
            PHIs in a block.
            (pass_dse::execute): Get TODO as computed by the DOM walker
            and return it.  Wipe dominator info earlier.

            * gcc.dg/pr95580.c: Disable DSE.
            * gcc.dg/Wrestrict-8.c: Place a use after each memcpy.
            * c-c++-common/ubsan/overflow-negate-3.c: Make asms volatile
            to prevent them from being removed.
            * c-c++-common/ubsan/overflow-sub-4.c: Likewise.

Reply via email to