diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2020-06-24 01:30:47 +0200 |
---|---|---|
committer | Ilya Leoshkevich <iii@linux.ibm.com> | 2021-09-28 14:10:59 +0200 |
commit | dbed1c8693c6b5cb02c903cea91db574200bd513 (patch) | |
tree | 1351e1465d3e9cd4d27b1f8d79f1245d83cac6b5 /gcc/tree-ssa-threadupdate.c | |
parent | 99c106e695bd8f1de580c4ff0b1d3fe59c9a4f1e (diff) | |
download | gcc-dbed1c8693c6b5cb02c903cea91db574200bd513.zip gcc-dbed1c8693c6b5cb02c903cea91db574200bd513.tar.gz gcc-dbed1c8693c6b5cb02c903cea91db574200bd513.tar.bz2 |
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.
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
0 files changed, 0 insertions, 0 deletions