On 12/6/24 5:23 AM, Sam James wrote:
Georg-Johann Lay <a...@gjlay.de> writes:
This patch disables CRC lookup tables which consume quite some RAM.
Given that -foptimize-crc is new, it may be useful to CC the pass
authors in case they have input.
I think this is trivially OK for the AVR. The bigger question is should
we do something more general for -Os.
CRC generation through table lookups is going to take more data space.
You need a 256 byte table for each unique CRC (sizes & polynomial), and
the code to compute the index into the table can be (from a code size
standpoint) relatively expensive as well, particularly on the
micro-controllers if the crc is to be computed in a mode wider than a
word on the target.
So I would actually even support a more general "don't optimize CRCs by
default for -Os".
Jeff