Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

About

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 more.  This would include the CRC loop in the Coremark benchmark – detecting and optimizing that idiom results in about a 10% improvement in Coremark scores.


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 LLVM which can detect the CRC in Coremark and generate a clmul optimized version.  The detection is not as strong as the GCC patches, nor does it have the ability to generate table variants if the target processor does not have clmul.


We recently discussed this optimization with the wider LLVM RISC-V community.  The takeaway was this work probably should be done in the generic optimizer rather than in a RISC-V specific pass.  


Stakeholders/Partners

RISE:

...

Page Properties


Development

Status
colourBlue
titleIN PROGRESS


Development TimelineNA
Upstreaming

Status
colourBlue
titleNOT STARTED


Upstream Version





Contacts

Jeff Law (Ventana)


Dependencies

None




Updates

 

  • Note Stakeholders/Partners in a consistent way

– Dates on or before June 1 are approximate

  • Project reported as priority for 2H231H2024