i386: Add clear_ratio to processor_costs

Programming / Compilers / GCC - hjl [138bc75d-0d04-0410-961f-82ee72b054a4] - 17 October 2019 14:34 EDT

i386.h has

#define CLEAR_RATIO(speed) ((speed) ? MIN (6, ix86_cost->move_ratio) : 2)

It is impossible to have CLEAR_RATIO > 6. This patch adds clear_ratio to processor_costs, sets it to the minimum of 6 and move_ratio in all cost models and defines CLEAR_RATIO with clear_ratio.

- config/i386/i386.h (processor_costs): Add clear_ratio. (CLEAR_RATIO): Remove MIN and use ix86_cost->clear_ratio.
- config/i386/x86-tune-costs.h: Set clear_ratio to the minimum of 6 and move_ratio in all cost models.

4fdf07df58f i386: Add clear_ratio to processor_costs
gcc/ChangeLog | 7 +++++++
gcc/config/i386/i386.h | 4 +++-
gcc/config/i386/x86-tune-costs.h | 24 ++++++++++++++++++++++++
3 files changed, 34 insertions(+), 1 deletion(-)

Upstream: gcc.gnu.org


  • Share