This is the mail archive of the gcc-patches@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: [PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets


Tom de Vries <Tom_deVries@mentor.com> writes:
> This patch adds scanning of clobbers in CALL_INSN_FUNCTION_USAGE to 
> find_all_hard_reg_sets.
>
> For MIPS, calls are split at some point. After the split, one of the
> resulting insns may clobber $6. But before the split, that's not
> explicit in the rtl representation of the unsplit call.
>
> For -fuse-caller-save, that's a problem, and Richard S. suggested to
> add the clobber of $6 to the CALL_INSN_FUNCTION_USAGE of the unsplit
> call.

Maybe here's a good place to raise this, but I was hoping all targets
could use CALL_INSN_FUNCTION_USAGE and we'd be able to drop the new
hook for -fuse-caller-save.  That seems better than adding another
place that needs to be checked when figuring out what a call clobbers.

In other words, I didn't want MIPS to be different from the other targets.
If we decide to keep the hook then MIPS should use it too.

Thanks,
Richard


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