Re: [PATCH 09/44] RISC-V: Rework branch costing model for if-conversion

2023-11-29 Thread Maciej W. Rozycki
On Tue, 28 Nov 2023, Jeff Law wrote: > FWIW, I was looking at a regression with our internal tests after your > changes. It was quite nice to see how well twiddling -mbranch-cost > correlated to how many instructions we would allow in a conditional move > sequence. I'm a bit concerned though t

Re: [PATCH 09/44] RISC-V: Rework branch costing model for if-conversion

2023-11-28 Thread Jeff Law
On 11/23/23 11:34, Maciej W. Rozycki wrote: On Sun, 19 Nov 2023, Jeff Law wrote: As I suspect you know a big part of the problem here is that BRANCH_COST and rtx_cost don't have any common scale and thus trying to compare BRANCH_COST to RTX_COST doesn't have well defined meaning. We do h

Re: [PATCH 09/44] RISC-V: Rework branch costing model for if-conversion

2023-11-23 Thread Maciej W. Rozycki
On Sun, 19 Nov 2023, Jeff Law wrote: > As I suspect you know a big part of the problem here is that BRANCH_COST and > rtx_cost don't have any common scale and thus trying to compare BRANCH_COST to > RTX_COST doesn't have well defined meaning. We do have preexisting places using COSTS_N_INSNS (BR

Re: [PATCH 09/44] RISC-V: Rework branch costing model for if-conversion

2023-11-19 Thread Jeff Law
On 11/18/23 22:36, Maciej W. Rozycki wrote: The generic branch costing model for if-conversion assumes a fixed cost of COSTS_N_INSNS (2) for a conditional branch, and that one half of that cost comes from a preceding condition-set instruction, such as with MODE_CC targets, and then the other h

[PATCH 09/44] RISC-V: Rework branch costing model for if-conversion

2023-11-18 Thread Maciej W. Rozycki
The generic branch costing model for if-conversion assumes a fixed cost of COSTS_N_INSNS (2) for a conditional branch, and that one half of that cost comes from a preceding condition-set instruction, such as with MODE_CC targets, and then the other half of that cost is for the actual branch ins