https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87871

--- Comment #25 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Peter Bergner from comment #24)
> So improve_allocation() initially looks at using r0, but disregards it
> because check_hard_reg_p() returns false for r0, and that is because we fail
> this test:
> 
>   /* Checking only profitable hard regs.  */
>   if (! TEST_HARD_REG_BIT (profitable_regs, hard_regno))
>     return false;
> 
> I don't know why r0 isn't in profitable_regs for pseudo 116.

Profitable regs there contain also conflict regs.  R0 is conflicting with p106.
If R0 usage (in call insn) were in the same BB, your new conflict calculation
found that there is no actual conflict.  But IRA uses df-infrastructure which
tells IRA that R0 lives at the BB end where p106 occurs.

So the right solution of the PR would be fixing df-infrastructure live analysis
or may be somehow to ignore usage of r0 in call insn. That is how see the
situation.

Reply via email to