[PATCH 3/7] ifcvt: Improve costs handling for noce_convert_multiple.

2021-06-25 Thread Robin Dapp via Gcc-patches
When noce_convert_multiple is called the original costs are not yet initialized. Therefore, up to now, costs were only ever unfairly compared against COSTS_N_INSNS (2). This would lead to default_noce_conversion_profitable_p () rejecting all but the most contrived of sequences. This patch tempor

Re: [PATCH 3/7] ifcvt: Improve costs handling for noce_convert_multiple.

2021-07-15 Thread Richard Sandiford via Gcc-patches
Robin Dapp writes: > When noce_convert_multiple is called the original costs are not yet > initialized. Therefore, up to now, costs were only ever unfairly > compared against COSTS_N_INSNS (2). This would lead to > default_noce_conversion_profitable_p () rejecting all but the most > contrived of

Re: [PATCH 3/7] ifcvt: Improve costs handling for noce_convert_multiple.

2021-07-22 Thread Robin Dapp via Gcc-patches
It looks like this is an existing (potential) problem, but default_noce_conversion_profitable_p uses seq_cost, which in turn uses insn_cost. And insn_cost has an optional target hook behind it, which allows for costing based on insn attributes etc. For a true apples-with-apples comparison we sho

Re: [PATCH 3/7] ifcvt: Improve costs handling for noce_convert_multiple.

2021-07-26 Thread Richard Sandiford via Gcc-patches
Robin Dapp writes: >> It looks like this is an existing (potential) problem, >> but default_noce_conversion_profitable_p uses seq_cost, which in turn >> uses insn_cost. And insn_cost has an optional target hook behind it, >> which allows for costing based on insn attributes etc. For a true >> ap