This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH][IRA] Analysis of register usage of functions for usage by IRA.
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 14 Mar 2013 11:11:29 -0400
- Subject: Re: [PATCH][IRA] Analysis of register usage of functions for usage by IRA.
- References: <510282FE.email@example.com> <5102A694.firstname.lastname@example.org> <5113FC6B.email@example.com> <511C1538.firstname.lastname@example.org> <514199BC.email@example.com>
On 03/14/2013 05:34 AM, Tom de Vries wrote:
On 13/02/13 23:35, Vladimir Makarov wrote:
Actually, I am done with it. In general, it is ok. Although I have
some minors comments:
Sorry for the delay with the answer. I was and am quite busy with other
more urgent things. I'll work on it when I have more free time. In any
case, I'll do it before stage1 to have your patch ready.
do you have an ETA on this review?
In Changelog, you missed '*" before cgraph.h:
* haifa-sched.c (recompute_todo_spec, check_clobbered_conditions): Add
new argument to find_all_hard_reg_sets call.
cgraph.h (struct cgraph_node): Add function_used_regs,
function_used_regs_initialized and function_used_regs_valid fields.
@@ -3391,6 +3394,7 @@ df_get_call_refs (struct df_collection_r
else if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)
I'd remove the test of regs_invalidated_by_call.
+ && TEST_HARD_REG_BIT (fn_reg_set_usage, i)
/* no clobbers for regs that are the result of the call */
&& !TEST_HARD_REG_BIT (defs_generated, i)
+ rtx insn;
+ int i;
+ struct cgraph_node *node;
+ struct hard_reg_set_container other_usage;
+ if (!flag_use_caller_save)
+ node = cgraph_get_node (current_function_decl);
+ gcc_assert (node != NULL);
+ gcc_assert (!node->function_used_regs_initialized);
+ node->function_used_regs_initialized = 1;
+ for (insn = get_insns (); insn != NULL_RTX; insn = next_insn (insn))
+ HARD_REG_SET insn_used_regs;
+ if (!NONDEBUG_INSN_P (insn))
+ find_all_hard_reg_sets (insn, &insn_used_regs, false);
+ if (CALL_P (insn)
+ && !get_call_reg_set_usage (insn, &insn_used_regs,
+ CLEAR_HARD_REG_SET (node->function_used_regs);
I'd put it before find_all_hard_reg_sets
+ IOR_HARD_REG_SET (node->function_used_regs, insn_used_regs);
But you can ignore my two last 2 comments.
The patch is ok for me for trunk at stage1. But I think you need a
formal approval for df-scan.c, arm.c, mips.c, GCC testsuite expect files
(lib/target-supports.exp and gcc.target/mips/mips.exp) as I am not a
maintainer of these parts although these changes look ok for me.
Thanks for your hard work and sorry for the review delay.
I guess you need to pay attention to reported problems for some time
after you commit the patch as it affects all targets.