[libc-commits] [PATCH] D111801: [libc] automemcpy

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Oct 14 06:19:50 PDT 2021


gchatelet created this revision.
gchatelet added a reviewer: courbet.
Herald added subscribers: libc-commits, ecnelises, tschuett, mgrang, mgorny.
Herald added a project: libc-project.
gchatelet requested review of this revision.

"automemcpy: A framework for automatic generation of fundamental memory operations"
https://research.google/pubs/pub50338/

This patch implements the concepts presented in the paper, the overall approach is the following:

- Makes use of constraint programming to model the implementation of a memory function (memcpy, memset, memcmp, bzero, bcmp).
- Generate the code for all valid implementations
- Compile the implementations and benchmark them on a set of machines. The benchmark makes use of representative distributions for the function's arguments.
- Analyze the result and pick "the best" performing function according to the specific environment.

This is the patch to be submitted but since it is quite big to review, it is split into several sub-patches:

- https://reviews.llvm.org/D111554
- https://reviews.llvm.org/D111621
- https://reviews.llvm.org/D111622
- https://reviews.llvm.org/D111624

Once all of them are accepted we can submit this one.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111801

Files:
  libc/benchmarks/CMakeLists.txt
  libc/benchmarks/automemcpy/CMakeLists.txt
  libc/benchmarks/automemcpy/README.md
  libc/benchmarks/automemcpy/include/automemcpy/CodeGen.h
  libc/benchmarks/automemcpy/include/automemcpy/FunctionDescriptor.h
  libc/benchmarks/automemcpy/include/automemcpy/RandomFunctionGenerator.h
  libc/benchmarks/automemcpy/lib/CMakeLists.txt
  libc/benchmarks/automemcpy/lib/CodeGen.cpp
  libc/benchmarks/automemcpy/lib/CodeGenMain.cpp
  libc/benchmarks/automemcpy/lib/RandomFunctionGenerator.cpp
  libc/benchmarks/automemcpy/lib/ResultAnalyzer.cpp
  libc/benchmarks/automemcpy/unittests/CMakeLists.txt
  libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp
  libc/src/string/memory_utils/elements.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111801.379692.patch
Type: text/x-patch
Size: 75307 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20211014/e0297d89/attachment-0001.bin>


More information about the libc-commits mailing list