Any rearranging of the code needs have exception region descriptors updated appropriately. The backend can eliminate dead code. Any associated exception region descriptor that refers to fully contained code that has been eliminated should also be removed, although not doing this is harmless in terms of semantics. The above is not meant to be exhaustive, but does include all things I have thought of so far. I am sure other limitations exist.
NOTEs are to be used to denote the start of an exception region, and the end of the region.
The frontends are required to call them in pairs. When marking the end of a region, an argument can be passed to indicate the handler for the marked region. This can be passed in many ways, currently a tree is used. Another possibility would be insns for the handler, or a label that denotes a handler. Semantics are, if an exception is thrown inside the region, control is transferred unconditionally to the handler.