On 06/19/2014 09:37 AM, Tom de Vries wrote:
> On 19-06-14 05:59, Richard Henderson wrote:
>> On 06/01/2014 04:27 AM, Tom de Vries wrote:
>>> +  if (TARGET_AAPCS_BASED)
>>> +    {
>>> +      /* For AAPCS, IP and CC can be clobbered by veneers inserted by the
>>> +     linker.  We need to add these to allow
>>> +     arm_call_fusage_contains_non_callee_clobbers to return true.  */
>>> +      rtx *fusage = &CALL_INSN_FUNCTION_USAGE (insn);
>>> +      clobber_reg (fusage, gen_rtx_REG (word_mode, IP_REGNUM));
>>> +      clobber_reg (fusage, gen_rtx_REG (word_mode, CC_REGNUM));
>>
>> Why are you adding CC_REGNUM if fixed registers are automatically included?
>>
> 
> Richard,
> 
> You're right, setting a fixed register here is not required for
> fuse-caller-save to work safely.
> 
> But it fits the definition of the hook
> TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS:
> ...
> Set to true if all the calls in the current function contain clobbers in
> CALL_INSN_FUNCTION_USAGE for the registers that are clobbered by the call
> rather than by the callee, and are not already set or clobbered in the call
> pattern.
> ...
> 
> We can adapt the definition to not include fixed registers. I can make a patch
> for that, if you like.

I think that would be best.  It'll save just a bit of memory and scanning time.


r~

Reply via email to