[Bug rtl-optimization/93272] LRA: EH reg allocated to hold local variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93272 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|--- |10.0 Status|REOPENED|RESOLVED --- Comment #9 from Andrew Pinski --- (In reply to Andreas Krebbel from comment #8) > Since this is a latent bug in LRA I think the patch needs backporting to GCC > 8 and 9 branches. 9 branch is closed so closing as fixed for GCC 10.
[Bug rtl-optimization/93272] LRA: EH reg allocated to hold local variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93272 Andreas Krebbel changed: What|Removed |Added Status|RESOLVED|REOPENED Last reconfirmed||2020-02-12 Resolution|FIXED |--- Ever confirmed|0 |1 --- Comment #8 from Andreas Krebbel --- Since this is a latent bug in LRA I think the patch needs backporting to GCC 8 and 9 branches.
[Bug rtl-optimization/93272] LRA: EH reg allocated to hold local variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93272 Jeffrey A. Law changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||law at redhat dot com Resolution|--- |FIXED --- Comment #7 from Jeffrey A. Law --- Should be fixed on the trunk.
[Bug rtl-optimization/93272] LRA: EH reg allocated to hold local variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93272 --- Comment #6 from CVS Commits --- The master branch has been updated by Vladimir Makarov : https://gcc.gnu.org/g:5c8a1211b9873a1b69ef7b2fddae181535bc3b0a commit r10-6304-g5c8a1211b9873a1b69ef7b2fddae181535bc3b0a Author: Vladimir N. Makarov Date: Tue Jan 28 15:43:44 2020 -0500 Fix for PR93272 - LRA: EH reg allocated to hold local variable 2020-01-28 Vladimir Makarov PR rtl-optimization/93272 * ira-lives.c (process_out_of_region_eh_regs): New function. (process_bb_node_lives): Call it.
[Bug rtl-optimization/93272] LRA: EH reg allocated to hold local variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93272 --- Comment #5 from Andreas Krebbel --- (In reply to Vladimir Makarov from comment #4) > (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. Please do. Thanks!
[Bug rtl-optimization/93272] LRA: EH reg allocated to hold local variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93272 --- Comment #4 from Vladimir Makarov --- (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.
[Bug rtl-optimization/93272] LRA: EH reg allocated to hold local variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93272 Andreas Krebbel changed: What|Removed |Added Attachment #47656|0 |1 is obsolete|| --- Comment #3 from Andreas Krebbel --- Created attachment 47714 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47714=edit 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.
[Bug rtl-optimization/93272] LRA: EH reg allocated to hold local variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93272 --- Comment #2 from Andreas Krebbel --- This problem to some degree is specific to IBM Z since our EH regs are call-saved registers. For targets using call-clobbered EH regs such a collisions usually cannot happen. Perhaps it can be provoked with -fnon-call-exceptions.
[Bug rtl-optimization/93272] LRA: EH reg allocated to hold local variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93272 Andreas Krebbel changed: What|Removed |Added Priority|P3 |P2
[Bug rtl-optimization/93272] LRA: EH reg allocated to hold local variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93272 --- Comment #1 from Andreas Krebbel --- Created attachment 47656 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47656=edit Experimental patch