Versions Compared

Key

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

About

This covers multiple efforts.

...

  1. Scalar inline expansion of various mem* and str* routines in GCC.  Essentially when some of the arguments are known the compiler can emit efficient versions of those routines while at the same time exposing the semantics to the optimizers allowing further optimization.  The scalar inline expansion work in GCC is largely complete at this point.  This work was largely done by VRULL under contract to Ventana.
  2. Vector inline expansion.  Similar to scalar expansion, but using vector instructions when possible.  The bulk of this work has already been integrated for gcc-14 and is the combination of work from Ventana (Robin Dapp) and EMBECOSM (Joern Rennecke).
  3. Additional vector inline expansion.  memmove, memset and memcmp can also be expanded inline by the compiler using vector instructions.  Sergei from Rivos has submitted an implementation of these routines, but the submission missed the gcc-14 deadline.  The implementation looks pretty reasonable and is expected to integrate into GCC in the late spring. It is expected this work will provide another percent or so improvement on the GCC workload within spec2017.
  4. VRULL's engineers are also working on improving scalar codegen for inlined cases in gcc.  For example using cboz for clearing cache lines, zbb for str[n]cmp, etc.
  5. Glibc provides generic versions of all the relevant routines and needs both scalar and vector implementations with automatic selection via ifuncs.
    1. VRULL has reasonable scalar implementations of several functions
    2. Rivos has reasonable vector implementations of several functions as well
    3. There is a general agreement that dynamic ifunc selection for RISC-V can be integrated after the glibc-2.39 release (due the first week of Feb).   So in the near these routines should be integrated into glibc with dynamic selection





Stakeholders/Partners

RISE:

Ventana: Jeff & Robin

Rivos: Palmer & Sergei


External:

                    VRULL: Christoph Muller

                    EMBECOSM: Joern Rennecke



Dependencies


Status

Page Properties


Development

Status
colourGreen
titleCOMPLETE


Development Timeline1H2024
Upstreaming

Status
colourGreen
titleCOMPLETE


Upstream Version

gcc-15 (target)

Spring 2025

glibc-2.40 (target)
Fall 2024




Contacts

Jeff Law (Ventana)


Dependencies

None




Updates

  • Sergei's last patch has been integrated upstream.
  • VRULL's patches have been integrated upstream.
  • We'll break out the glibc work into a 2H2024 item 

...