On 17-04-14 18:49, Vladimir Makarov wrote:
I see. I guess your proposed solution is ok then.
Vladimir,
Richard,
I've updated the fuse-caller-save patch series to model non-callee call clobbers
in CALL_INSN_FUNCTION_USAGE.
There are 2 new hooks:
1. call_fusage_contains_non_callee_clobbers.
A hook to indicate whether a target has added the non-callee call clobbers to
CALL_INSN_FUNCTION_USAGE, meaning it's safe to do the fuse-caller-save optimization.
2. post_expand_call_insn.
A utility hook to facilitate adding the clobbers to CALL_INSN_FUNCTION_USAGE.
I've bootstrapped and reg-tested on x86_64, and I've build and reg-tested on
MIPS.
The series now looks like:
1 -fuse-caller-save - Add command line option
2 -fuse-caller-save - Add new reg-note REG_CALL_DECL
3 Add implicit parameter to find_all_hard_reg_sets
4 Register CALL_INSN_FUNCTION_USAGE in find_all_hard_reg_sets
5 Add call_fusage_contains_non_callee_clobbers hook
6 -fuse-caller-save - Collect register usage information
7 -fuse-caller-save - Use collected register usage information
8 -fuse-caller-save - Enable by default at O2 and higher
9 -fuse-caller-save - Add documentation
10 -fuse-caller-save - Add test-case
11 Add post_expand_call_insn hook
12 Add clobber_reg
13 -fuse-caller-save - Enable for MIPS
14 -fuse-caller-save - Enable for ARM
15 -fuse-caller-save - Enable for AArch64
16 -fuse-caller-save - Support in lra
17 -fuse-caller-save - Enable for i386
The submission/approval status is:
1-3, 7-10, 16: approved
4: submitted, pinged Eric Botcazou 16-04-2014
5, 11: new hook, need to submit
6, 14-15: approved earlier, but need to resubmit due to updated hook
12: new utility patch, need to submit
13: need to resubmit due to updated hook
17: need to submit
I'll post the patches that need (re)submitting.
Thanks,
- Tom