On 16/04/14 12:28, Richard Sandiford wrote: >> > This patch introduces a hook that specifies which registers are implicitly >> > clobbered by a call, not including the registers that are clobbered in the >> > called function, and then uses that hook to add those registers to >> > CALL_INSN_FUNCTION_USAGE.
> I don't think a new hook is needed. Richard, the hook enables us to determine whether a target supplies the information provided by the hook. If the target does not provide this information, the fuse-caller-save optimization is possibly not safe. How do you propose to handle this without this hook? Apart from that, I don't see the reason why we should add similar code to several targets, if we can add a hook that specifies information about the target, and add generic code that handles the information. Thanks, - Tom