https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87466
Bug ID: 87466 Summary: IRA and LRA spill all pseudos that are live across setjmp calls Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: bergner at gcc dot gnu.org Target Milestone: --- Currently, both IRA and LRA spill all pseudo regs that are live across a setjmp call. If the target has a sane setjmp, then the compiler should not have to treat the setjmp call any different to any other normal function call, namely, just mark all pseudos that are live across the setjmp as conflicting with the volatile registers. This issue was discussed in the following gcc mailing list thread: https://gcc.gnu.org/ml/gcc/2018-03/msg00014.html Some people mentioned that some systems do not have sane setjmp implementations and so need the spill all pseudos to get correct functionality. It was decided that a target hook should be created that can allow targets to tell IRA and LRA whether they have a sane setjmp implementation or not. This bugzilla entry is being used to track that work.