[PATCH 3/4 GCC11] IVOPTs Consider cost_step on different forms during unrolling
Segher Boessenkool
segher@kernel.crashing.org
Mon Jan 20 14:42:00 GMT 2020
Hi!
On Mon, Jan 20, 2020 at 01:47:56PM +0000, Wilco Dijkstra wrote:
> Would it not make more sense to use the TARGET_ADDRESS_COST hook
> to return different costs for immediate offset and register offset addressing,
> and ensure IVOpts correctly takes this into account?
>
> On AArch64 we've defined different costs for immediate offset, register offset,
> register offset with extend, pre-increment and post-increment.
>
> I don't see why this has been defined to always return 0 on rs6000...
The actual insns are the same cost for us, approximately anyway. Maybe
it would help to make this non-zero for reg+reg addressing, thanks for
the hint.
There must be something else wrong as well though; I don't see how
ivopts could come up with what it does currently as the best plan.
Segher
More information about the Gcc-patches
mailing list