...
Cyclic Redundancy Check (CRC) is a standardized way to implement a degree of data validation and is used in various over the wire protocols, data checksums, etc. Naive implementations are a bitwise loop over an input message and highly inefficient. Detection of a CRC loop and transformation into either a table lookup or a combination of clmul + shift operations can speed up such code by 2X or more10X. This would include the CRC loop in the Coremark benchmark – detecting and optimizing that idiom results in about a 10% 10-20% improvement in Coremark scores depending on the micro-architecture.
The detection of a CRC loop is a complex optimization with elements of vectorization, feedback loops, pattern matching, etc. It is further complicated by function inlining. At this time we have patches for upstream GCC that can detect and generate code (either table lookup or clmul) for a variety of CRC implementations. An aggressive schedule would be integration in time for gcc-14, but more likely it will fall into gcc-15.
...
Page Properties | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Updates
- Significant cleanup of backend support. Should (in theory) be target independent at this point. We'll do some testing on other targets to verify this shortly.
- Cleanup of the main recognizer and LFSR validation step in progress
- Evaluating the ability of Ranger to eliminate the need to introduce another symbolic engine.
- As noted before, not a great initial response to carving out the backend work and trying to upstream that for gcc-14
- Regardless, we're working through various review comments to make it more palatable for upstream gcc
- Generalize table based CRC generation so that it works on multiple targets
- Fix implementation details that would cause failures when running gcc on different host platforms targeting rv64
- Various coding convention, documentation and formatting issues necessary for upstreamingFocu
- Not a great initial response to builtin_crc to carve out initial backend work
- Still evaluating if there's a path forward without having to submit full end-to-end optimization
...