You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However it is not the case for many other chips that the rcc:u8 relationship is 1:1 like this.
For some targets, some amount of size reduction can be had by inlining init_pll, since it may be called multiple times. Though the biggest reduction can be had if init_pll is inlined and the giant match can become smoller. Dirbaio suggested to make the code generation smarter at detecting simple cases like this, and use simpler code instead.
The text was updated successfully, but these errors were encountered:
Discussed this in the matrix chat, posting here to track the issue.
Some chips will have multiple KiB of bloat in the binary due to the sometimes very large match statements generated here.
For example, the stm32f405, has the following generated code:
which is obviously very inefficient when in this case this would suffice:
However it is not the case for many other chips that the rcc:u8 relationship is 1:1 like this.
For some targets, some amount of size reduction can be had by inlining init_pll, since it may be called multiple times. Though the biggest reduction can be had if init_pll is inlined and the giant match can become smoller. Dirbaio suggested to make the code generation smarter at detecting simple cases like this, and use simpler code instead.
The text was updated successfully, but these errors were encountered: