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

--- Comment #18 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Ilya Leoshkevich <i...@gcc.gnu.org>:

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

commit r12-3922-gdbed1c8693c6b5cb02c903cea91db574200bd513
Author: Ilya Leoshkevich <i...@linux.ibm.com>
Date:   Wed Jun 24 01:30:47 2020 +0200

    reassoc: Propagate PHI_LOOP_BIAS along single uses

    PR tree-optimization/49749 introduced code that shortens dependency
    chains containing loop accumulators by placing them last on operand
    lists of associative operations.

    456.hmmer benchmark on s390 could benefit from this, however, the code
    that needs it modifies loop accumulator before using it, and since only
    so-called loop-carried phis are are treated as loop accumulators, the
    code in the present form doesn't really help.   According to Bill
    Schmidt - the original author - such a conservative approach was chosen
    so as to avoid unnecessarily swapping operands, which might cause
    unpredictable effects.  However, giving special treatment to forms of
    loop accumulators is acceptable.

    The definition of loop-carried phi is: it's a single-use phi, which is
    used in the same innermost loop it's defined in, at least one argument
    of which is defined in the same innermost loop as the phi itself.
    Given this, it seems natural to treat single uses of such phis as phis
    themselves.

    gcc/ChangeLog:

            * tree-ssa-reassoc.c (biased_names): New global.
            (propagate_bias_p): New function.
            (loop_carried_phi): Remove.
            (propagate_rank): Propagate bias along single uses.
            (get_rank): Update biased_names when needed.

Reply via email to