This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch for PR82444
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, richard dot sandiford at linaro dot org
- Date: Thu, 1 Feb 2018 14:29:13 -0500
- Subject: Re: patch for PR82444
- Authentication-results: sourceware.org; auth=none
- References: <540c9fcb-948b-f4b9-2561-033513db8219@redhat.com> <87bmh84ov1.fsf@linaro.org>
On 02/01/2018 12:10 PM, Richard Sandiford wrote:
Vladimir Makarov <vmakarov@redhat.com> writes:
Not sure about the E_<mode>/genmodes reference here. Isn't it simply
"because it might be the mode a pseudo register"?
Is it OK to expand the explanation a bit, as below?
Yes, it is OK. It is a better explanation. Thank you, Richard.
2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* ira.c (ira_init_register_move_cost): Adjust comment.
Index: gcc/ira.c
===================================================================
--- gcc/ira.c 2018-02-01 17:09:45.998165072 +0000
+++ gcc/ira.c 2018-02-01 17:09:46.150158481 +0000
@@ -1578,8 +1578,10 @@ ira_init_register_move_cost (machine_mod
ira_assert (ira_register_move_cost[mode] == NULL
&& ira_may_move_in_cost[mode] == NULL
&& ira_may_move_out_cost[mode] == NULL);
- /* have_regs_of_mode[mode] might be false because it might be
- E_<mode> (see genmodes) of pseudo with <mode>. */
+ /* Note that we might be asked about the move costs of modes that
+ cannot be stored in any hard register, for example if an inline
+ asm tries to create a register operand with an impossible mode.
+ We therefore can't assert have_regs_of_mode[mode] here. */
for (cl1 = 0; cl1 < N_REG_CLASSES; cl1++)
for (cl2 = 0; cl2 < N_REG_CLASSES; cl2++)
{