RTX costs
Paulo J. Matos
pocmatos@gmail.com
Tue Feb 9 15:56:00 GMT 2010
Joern Rennecke wrote:
> 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.
Thanks for the reply. The name of the macro COSTS_N_INSNS was making me
think I was estimating numbers of insns instead of number of assembler
instructions even though when optimising for size the latter makes more
sense.
More information about the Gcc
mailing list