[PATCH] register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets
Tom de Vries
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?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1121 bytes
Desc: not available
More information about the Gcc-patches