This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] slightly better reload constant rematerialization


On Thu, Jan 20, 2005 at 02:46:47PM -0500, Ian Lance Taylor wrote:
> The natural cost metrics to use would seem
> to be REGISTER_MOVE_COST and rtx_cost.  Of course, as far as I know,
> we've never before said that those costs were commensurable.

Indeed they are not.  The closest I can come up with is

  COST_N_INSNS (REGISTER_MOVE_COST (x, y)) / 2

since the basis of REGISTER_MOVE_COST is defined to be 2 for
r->r moves, which I will equate to a latency of 1, which is
normally how COST_N_INSNS is defined.  Except for -Os at which
point I have no idea how this works out.

> I kind of feel that a comparison model would work better, in which we
> can say "which is better: instruction sequence 1 or instruction
> sequence 2?"  Then even in the current reductionist case of a single
> instruction or just part of one, we can still hopefully make more
> intelligent decisions rather than doing trial and error tinkering with
> cost values.

I don't think I understand.  How do we compare the sequences if not
by some abstract cost metric?


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]