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

            Bug ID: 116968
           Summary: There should be an rtl version of
                    stmt_unremovable_because_of_non_call_eh_p
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: internal-improvement
          Severity: enhancement
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

This came up in the review here:
https://gcc.gnu.org/pipermail/gcc-patches/2024-October/664390.html

```
I don't like these magic flags that every relevant pass has to remember
to check individually.  In practice, the only way they will be checked
is if code is copied-and-pasted between passes (meaning an abstraction
is missing) or by trial and error.

I couldn't find an obvious helper routine for it, though, so I agree
this is the established best practice.
```

On the gimple side we have stmt_unremovable_because_of_non_call_eh_p though it
has been forgot to be checked every once in a while (e.g.
r12-4661-g7518e4c2f0758d ). Maybe there is a better abstraction here for both
rtl and gimple.

Reply via email to