On 8/3/23 13:37, Mariam Harutyunyan via Gcc-patches wrote:
This patch adds CRC support for the RISC-V architecture. It adds internal
functions and built-ins specifically designed to handle CRC computations
efficiently.

If the target is ZBC, the clmul instruction is used for the CRC code
generation; otherwise, table-based CRC is generated.  A table with 256
elements is used to store precomputed CRCs.

These CRC calculation algorithms have higher performance than the naive CRC
calculation algorithm.
So just a little bit of additional information for others that might be looking at this thread.

The end goal here is to actually detect bitwise CRC implementations in the gimple optimizers and turn them into table lookups or carryless multiplies in RTL.

Mariam has that working end-to-end and has proposed a talk for the Cauldron on the topic.

The idea here is to carve out the RTL side which we think provides potential value to end users (the ability to use the builtin to get an performant CRC implementation) and to get community feedback on the implementation.

So this isn't the end of the line for this work, just the first carved out chunk.

Jeff

Reply via email to