[libc-commits] [PATCH] D111622: [libc] automemcpy - codegen

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Oct 13 07:42:04 PDT 2021


gchatelet added inline comments.


================
Comment at: libc/benchmarks/automemcpy/CodeGen.cpp:12
+// 1. Includes
+// 2. Forward declarations
+// 3. Source code for all the functions.
----------------
courbet wrote:
> "Forward declarations of what ? The mem function implementations ?"
Actually it was not forward declarations but `using` statements


================
Comment at: libc/benchmarks/automemcpy/CodeGen.cpp:303
+  if (auto C = FD.Overlap)
+    for (size_t I = C->Span.Begin; I < C->Span.End; I *= 2)
+      Impl.Overlaps.push_back(Overlap{2 * I, ElementType{I}});
----------------
courbet wrote:
> It's not a correctness issue, but it's worth nothing that not all architectures have all register sizes, e.g. x86 SSE has 1,2,4,16, but here we'll still be generating an `Overlap<8>`, which may not be very efficient...
Acknowledged. Ultimately the benchmark decides so it's not a problem if the implementation performs badly. Actually this is interesting since we get to learn something :D


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111622/new/

https://reviews.llvm.org/D111622



More information about the libc-commits mailing list