diff options
author | Robin Dapp <rdapp@linux.ibm.com> | 2019-11-27 13:53:40 +0100 |
---|---|---|
committer | Robin Dapp <rdapp@linux.ibm.com> | 2022-01-19 18:36:04 +0100 |
commit | e9ebb86799fd77cdd5351078230c114a90e66066 (patch) | |
tree | b4059397fb9dbe62eb1ae824af3b22f13c7ab400 /gcc/fortran | |
parent | 46346d8d76c24bd07a30cb2c367e34601efabfef (diff) | |
download | gcc-e9ebb86799fd77cdd5351078230c114a90e66066.zip gcc-e9ebb86799fd77cdd5351078230c114a90e66066.tar.gz gcc-e9ebb86799fd77cdd5351078230c114a90e66066.tar.bz2 |
ifcvt/optabs: Allow using a CC comparison for emit_conditional_move.
Currently we only ever call emit_conditional_move with the comparison
(as well as its comparands) we got from the jump. Thus, backends are
going to emit a CC comparison for every conditional move that is being
generated instead of re-using the existing CC.
This, combined with emitting temporaries for each conditional move,
causes sky-high costs for conditional moves.
This patch allows to re-use a CC so the costing situation is improved a
bit.
gcc/ChangeLog:
* rtl.h (struct rtx_comparison): New struct that holds an rtx
comparison.
* config/rs6000/rs6000.cc (rs6000_emit_minmax): Use struct instead of
single parameters.
(rs6000_emit_swsqrt): Likewise.
* expmed.cc (expand_sdiv_pow2): Likewise.
(emit_store_flag): Likewise.
* expr.cc (expand_cond_expr_using_cmove): Likewise.
(expand_expr_real_2): Likewise.
* ifcvt.cc (noce_emit_cmove): Add compare and reversed compare
parameters.
* optabs.cc (emit_conditional_move_1): New function.
(expand_doubleword_shift_condmove): Use struct.
(emit_conditional_move): Use struct and allow to call directly
without going through preparation steps.
* optabs.h (emit_conditional_move): Use struct.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions