Michael Matz wrote: [...] > As you didn't adjust any cost I would guess the high value comes from the > default implementation of address_cost, which simply uses arithmetic cost, > and the MULT in there is quite expensive by default. > > See TARGET_ADDRESS_COST in several ports.
Oddly, TARGET_ADDRESS_COST is never being called for my port, but yes, my not having implemented any costing appears to be fundamentally the issue. After having done a bunch of reading up on how costing works, and deciphering the rather cryptic other ports, my understanding is: Costing is based entirely on analysis of the RTL, and is completely irrelevant of what insns are selected. Therefore if my backend wants to support certain optimised addressing modes, I need to insert code into my TARGET_RTX_COSTS hook that looks for mem constructions which can be represented by such addressing modes, and encourages the compiler to select them by giving them a low cost. I don't get any assistance from the patterns in the .md file. Have I got that right? -- ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── │ "USER'S MANUAL VERSION 1.0: The information presented in this │ publication has been carefully for reliability." --- anonymous │ computer hardware manual
signature.asc
Description: OpenPGP digital signature