https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103860
Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #52088|0                           |1
        is obsolete|                            |

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 52089
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52089&action=edit
gcc12-pr103860.patch

Not sure I understand what you'd like to see.
But, thinking more about it, we can easily avoid all the code duplication by
moving the vec.is_empty () test out of the while loop condition, right before
we pop from the stack.  That way this can_get_prologue check is done on pro not
just before we pop something from the stack, but also after the last iteration
when there is nothing further on the stack.

If we wanted to avoid calling can_get_prologue that often (if pro doesn't
change we call it again and again already before my patch), we could also add a
var to hold the last pro we've successfully checked and only do this checking
if we get a new pro.

Reply via email to