best ABI strategy ?

Aurelien Buhrig aurelien.buhrig.gcc@gmail.com
Thu Dec 1 13:09:00 GMT 2011


2011/11/30 Ian Lance Taylor <iant@google.com>:
> Aurelien Buhrig <aurelien.buhrig.gcc@gmail.com> writes:
>
>> I'm trying to optimize our target ABI, and I'm wondering what is the
>> best strategy to define it.
>> Is there a paper, or any hint, dealing with this topic ?
>> For instance,
>> - which ratio between call-used-reg vs "static regs"
>> - which ratio between arg regs vs call-used-reg
>> - what should be return regs
>> - ...
>> I guess this problem is very target dependent, but there are maybe
>> general ideas about this.
>
> I don't know of any papers on this topic.
>
> There are several things that feed into this, including:
>
> * The relative cost of saving registers on the stack.
>
> * How orthogonal your register set is--e.g., are there any registers
>  with special purposes in the ISA?  Are there different register
>  classes that hold different types of values?  Are there any
>  restrictions on which registers can be used in a memory address?
>
> * How many registers you have overall.
>
> * What kind of code you are most interested in optimizing.  E.g., image
>  processing code tends to lead to functions with lots of loops with
>  lots of loop local variables that benefit from being in registers.
>
> Ian

This pb is indeed highly hardware and application dependent. I will
experiment to see what is the best...

Thanks for your help,
Aurélien



More information about the Gcc-help mailing list