circuitpython/shared-bindings/microcontroller
Jeff Epler 55b0f157c7 Mark functions as NORETURN
Surprisingly this leads to some code size savings on itsybitsym4,
even though LTO optimization should have let the compiler deduce
(almost) all of this.

When a compiler knows a call can never return, it is possibly able
to avoid emitting code, such as saving caller-saved registers to the
stack, or doing _ANYTHING_ affter the function returns, explaining
why code size savings is possible with this attribute.

With the exception of raise_deinited_error, these were found by checking
the functions found by `-Wmissing-noreturn` and making a case by case
decision. However, this dignostic can't be enabled unconditionally as it
has false positives, functions we do NOT want to mark as noreturn.

Testing performed: built itsybitsy m4, flash size savings 128 bytes.
didn't test on hardware as none came on this trip with me.
2025-04-16 16:57:09 +02:00
..
__init__.c Switch to ruff like MicroPython 2025-02-05 11:09:15 -08:00
__init__.h Mark functions as NORETURN 2025-04-16 16:57:09 +02:00
Pin.c Switch to ruff like MicroPython 2025-02-05 11:09:15 -08:00
Pin.h guard2once -s ... 2024-05-19 20:40:44 -04:00
Processor.c Switch to ruff like MicroPython 2025-02-05 11:09:15 -08:00
Processor.h guard2once -s ... 2024-05-19 20:40:44 -04:00
ResetReason.c Switch to ruff like MicroPython 2025-02-05 11:09:15 -08:00
ResetReason.h guard2once -s ... 2024-05-19 20:40:44 -04:00
RunMode.c Switch to ruff like MicroPython 2025-02-05 11:09:15 -08:00
RunMode.h guard2once -s ... 2024-05-19 20:40:44 -04:00