A few days ago, someone asked about the code 'gcc' generates when a function ends with a function call. Specifically, why does it call the function and then return, for example
ldi r24,lo8(0) rcall wr_out_all .stabn 68,0,23,.LM3-kill_outputs .LM3: /* epilogue: frame size=0 */ ret
rather than just jump to the function to save flash and cycles
ldi r24,lo8(0) rjmp wr_out_all .stabn 68,0,23,.LM3-kill_outputs .LM3: /* epilogue: frame size=0 */
Out of curiousity, I wrote an 'awk' script to see how hard this would be to fix. After spending three hours to save 8 bytes out of 2000 (0.4%), I have confirmed what I had expected: that the hack wasn't worth doing. :)
Now that it is written, however, would there be any interest in my uploading the script to the AVR Freaks site? If so, where should I put it? It is not really a user project or a design note.