This is an archive of the discontinued LLVM Phabricator instance.

[libc] mem* framework v3
ClosedPublic

Authored by gchatelet on Oct 19 2022, 1:53 PM.

Details

Summary

This version is more composable and also simpler at the expense of being more explicit and more verbose.

This patch provides rationale for the framework, implementation and unit tests but the functions themselves are still using the previous version. The change in implementation will come in a follow up patch.

Diff Detail

Event Timeline

gchatelet created this revision.Oct 19 2022, 1:53 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 19 2022, 1:53 PM
gchatelet requested review of this revision.Oct 19 2022, 1:53 PM
courbet added inline comments.Oct 20 2022, 1:34 AM
libc/src/string/memory_utils/op_aarch64.h
47

Maybe give a better error message: "a loop of size 1 does not need tail, use 'Loop' instead" ?

72

?

libc/src/string/memory_utils/op_generic.h
90

Make this the static_assert message

libc/test/src/string/memory_utils/CMakeLists.txt
11–12

submit this separately ?

libc/test/src/string/memory_utils/elements_test.cpp
45 ↗(On Diff #469038)

ditto

libc/test/src/string/memory_utils/op_tests.cpp
98

FnImpl ?

111

assert(size == T::SIZE) ?

127

", from size to 2*size"

137

ditto

184

ditto (here and below)

gchatelet updated this revision to Diff 469135.Oct 20 2022, 1:57 AM
gchatelet marked 2 inline comments as done.
  • rebase
gchatelet updated this revision to Diff 469160.Oct 20 2022, 4:17 AM
gchatelet marked 8 inline comments as done.
  • Address comments
gchatelet updated this revision to Diff 469162.Oct 20 2022, 4:32 AM
  • Only test generic::Memset<64> for avx512
gchatelet updated this revision to Diff 469195.Oct 20 2022, 5:55 AM
  • Address comments
  • Only test generic::Memset<64> for avx512
  • fix formatting
courbet accepted this revision.Oct 20 2022, 6:40 AM
This revision is now accepted and ready to land.Oct 20 2022, 6:40 AM
This revision was automatically updated to reflect the committed changes.
gchatelet reopened this revision.Oct 22 2022, 5:02 AM

Reopening to fix issues discovered on the build bots

This revision is now accepted and ready to land.Oct 22 2022, 5:02 AM
gchatelet updated this revision to Diff 469884.Oct 22 2022, 5:02 AM
  • Fix ASAN failures, explicitly use ASAN poisoning.
  • Fix arm buildbot, wrong namespace
gchatelet updated this revision to Diff 469931.Oct 22 2022, 2:09 PM
  • Fix aarch64 bcmp tests
courbet accepted this revision.Oct 24 2022, 1:31 AM
This revision was automatically updated to reflect the committed changes.