This is the mail archive of the
mailing list for the GCC project.
Re: CALL_USED_REGISTERS per function basis
I am thinking (as I am not familiar with IRA) to the following
alternative to your solution:
I set to zero all CALL_USED_REGISTERS (except the fixed regs), and
then in the expand_call I set CALL_INSN_FUNCTION_USAGE to the list of
clobbered registers (given by attribute attached to a function
declaration). Then, I should be able to achieve the same effect
without touching the IRA.
Additionally, a global variable will hold the "default"
call_used_registers for the cases when the function call used regs
attribute is not set.
What do you think about this approach?