Commit 8f21260c by Vladimir Makarov Committed by Vladimir Makarov

re PR middle-end/59609 (LRA generates bad code for libgcc function udivmoddi4 on thumb1 target)

2014-01-16  Vladimir Makarov  <vmakarov@redhat.com>

	PR middle-end/59609
	* lra-constraints.c (process_alt_operands): Add printing debug
	info.  Check absence of input/output reloads for matched operands
	too.

From-SVN: r206677
parent 1a788c05
2014-01-16 Vladimir Makarov <vmakarov@redhat.com> 2014-01-16 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/59609
* lra-constraints.c (process_alt_operands): Add printing debug
info. Check absence of input/output reloads for matched operands
too.
2014-01-16 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/59835 PR rtl-optimization/59835
* ira.c (ira_init_register_move_cost): Increase cost for * ira.c (ira_init_register_move_cost): Increase cost for
impossible modes. impossible modes.
......
...@@ -1710,7 +1710,6 @@ process_alt_operands (int only_alternative) ...@@ -1710,7 +1710,6 @@ process_alt_operands (int only_alternative)
&& MEM_P (*curr_id->operand_loc[m]) && MEM_P (*curr_id->operand_loc[m])
&& curr_alt[m] == NO_REGS && ! curr_alt_win[m]) && curr_alt[m] == NO_REGS && ! curr_alt_win[m])
continue; continue;
} }
else else
{ {
...@@ -2082,7 +2081,8 @@ process_alt_operands (int only_alternative) ...@@ -2082,7 +2081,8 @@ process_alt_operands (int only_alternative)
int i; int i;
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (HARD_REGNO_MODE_OK (i, mode) if (HARD_REGNO_MODE_OK (i, mode)
&& in_hard_reg_set_p (reg_class_contents[this_alternative], mode, i)) && in_hard_reg_set_p (reg_class_contents[this_alternative],
mode, i))
break; break;
if (i == FIRST_PSEUDO_REGISTER) if (i == FIRST_PSEUDO_REGISTER)
winreg = false; winreg = false;
...@@ -2095,7 +2095,13 @@ process_alt_operands (int only_alternative) ...@@ -2095,7 +2095,13 @@ process_alt_operands (int only_alternative)
badop = false; badop = false;
if (badop) if (badop)
goto fail; {
if (lra_dump_file != NULL)
fprintf (lra_dump_file,
" alt=%d: Bad operand -- refuse\n",
nalt);
goto fail;
}
this_alternative_offmemok = offmemok; this_alternative_offmemok = offmemok;
if (this_costly_alternative != NO_REGS) if (this_costly_alternative != NO_REGS)
...@@ -2132,7 +2138,14 @@ process_alt_operands (int only_alternative) ...@@ -2132,7 +2138,14 @@ process_alt_operands (int only_alternative)
[this_alternative][0], [this_alternative][0],
GET_MODE GET_MODE
(*curr_id->operand_loc[nop]))) (*curr_id->operand_loc[nop])))
goto fail; {
if (lra_dump_file != NULL)
fprintf
(lra_dump_file,
" alt=%d: Strict low subreg reload -- refuse\n",
nalt);
goto fail;
}
losers++; losers++;
} }
if (operand_reg[nop] != NULL_RTX if (operand_reg[nop] != NULL_RTX
...@@ -2175,8 +2188,17 @@ process_alt_operands (int only_alternative) ...@@ -2175,8 +2188,17 @@ process_alt_operands (int only_alternative)
&& no_output_reloads_p && no_output_reloads_p
&& ! find_reg_note (curr_insn, REG_UNUSED, op)) && ! find_reg_note (curr_insn, REG_UNUSED, op))
|| (curr_static_id->operand[nop].type != OP_OUT || (curr_static_id->operand[nop].type != OP_OUT
&& no_input_reloads_p && ! const_to_mem)) && no_input_reloads_p && ! const_to_mem)
goto fail; || (this_alternative_matches >= 0
&& (no_input_reloads_p || no_output_reloads_p)))
{
if (lra_dump_file != NULL)
fprintf
(lra_dump_file,
" alt=%d: No input/otput reload -- refuse\n",
nalt);
goto fail;
}
/* Check strong discouragement of reload of non-constant /* Check strong discouragement of reload of non-constant
into class THIS_ALTERNATIVE. */ into class THIS_ALTERNATIVE. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment