On 11/5/23 11:48, Richard Sandiford wrote:
The mode-switching pass already had hooks to say what mode
an entity is in on entry to a function and what mode it must
be in on return.  For SME, we also want to say what mode an
entity is guaranteed to be in on entry to an exception handler.

gcc/
        * target.def (mode_switching.eh_handler): New hook.
        * doc/tm.texi.in (TARGET_MODE_EH_HANDLER): New @hook.
        * doc/tm.texi: Regenerate.
        * mode-switching.cc (optimize_mode_switching): Use eh_handler
        to get the mode on entry to an exception handler.
Can we ever have a path to the exception handler triggered by a normal control flow and if so, presumably we want this to apply in that case too?

It looks like that's the semantics of the implementation by way to using bb_has_eh_pred. Just want to make sure that's the semantics you want in that oddball case.

Assuming it is the semantics you want, it's OK for the trunk, though you might want to twiddle the docs slightly to mention that case.

jeff

Reply via email to