[PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets

Tom de Vries Tom_deVries@mentor.com
Wed Jan 15 16:53:00 GMT 2014


This patch adds scanning of clobbers in CALL_INSN_FUNCTION_USAGE to 

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.

I wrote a patch for that ( 
http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00730.html ), but found that doing 
so did not fix the problem with -fuse-caller-save, because 
find_all_hard_reg_sets (the mechanism -fuse-caller-save uses to detect which 
registers are set or clobbered) does not take CALL_INSN_FUNCTION_USAGE into 
account. This patch fixes that.

Build and reg-tested on MIPS.

OK for stage1 if x86_64 bootstrap & reg-test succeeds?

- Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fuse-caller-save-call-insn-fusage.patch
Type: text/x-patch
Size: 1121 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140115/d3e331b6/attachment.bin>

More information about the Gcc-patches mailing list