This is the mail archive of the gcc-help@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: best ABI strategy ?


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


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