RTX costs

Joern Rennecke joern.rennecke@embecosm.com
Tue Feb 9 14:12:00 GMT 2010


Quoting "Paulo J. Matos" <pocmatos@gmail.com>:

> Hi all,
>
> After reading the internal docs about rtx_costs I am left wondering
> what they exactly are estimating.
> - Are they estimating in the beginning of expand how many insns will be
> generated from a particular insn until the assembler is generated?
> - or Are they estimating how many assembler instructions will be
> generated for a particular insn?
> - or something else?

When optimizing for speed, they estimate execution cycles, when
optimizing for space, they estimate code size.  In each case,
normalized so that COSTS_N_INSNS (1) is equivalent to the cost of
a simple instruction.  Or at least that's the theoretical goal.
Individual ports might deviate from that for historical and/or
practical reasons.



More information about the Gcc mailing list