[Bug rtl-optimization/93272] LRA: EH reg allocated to hold local variable

vmakarov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 27 16:56:00 GMT 2020


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

--- Comment #4 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Andreas Krebbel from comment #3)
> Created attachment 47714 [details]
> IRA EH fix - only when added at start of BB
> 
> A probably better version of the fix. This version only reverts the
> allocation decision if the move is about to be added at the start of an EH
> basic block.

Andreas, thank you for explaining the problem.  Your patch should solve the
problem but my worry is that the final assignment can be worse (especially if
the pseudo in a loop goes into an EH bb).

I think that such pseudo should have the right conflicting hard regnos
**before** the assignment.  In this case the pseudo did not get a hard register
living into EH but still can get another hard register.

If you don't mind, I will take it from here and try to create such patch.  If
you want to continue this work by yourself, please let me know.


More information about the Gcc-bugs mailing list