In the pdk header, the last entry used by hte system is the interrupt vector. Currently, SDCC places a goto to the interrupt handler there (if one exists, otherwise just a reti).
There is a slightly more efficient alternative: Put the interrrupt handler in its own section, and let the linker place that section at the interrupt vecor address. This would save 2 cycles (for the goto) of interrupt latency.
When generating an interrupt handler, we would omit the reti at the end. This reti would instead be placed as another item in the same section as the interrupt handler, as this ould result in there always being a reti (either at the end of the handler or standa-lone when there is no handler).
The only potential problem is that it would be harder to diagnose the error of declaring multiple handlers (though the naive implementation would just result in calling all of them in an undefined order - not that bad).