This is an archive of the discontinued LLVM Phabricator instance.

[MemFunctions] Add validity check.
ClosedPublic

Authored by courbet on Mar 12 2020, 3:50 AM.

Details

Reviewers
gchatelet
Summary

Validate the results in addition to benchmarking.

Event Timeline

courbet created this revision.Mar 12 2020, 3:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 12 2020, 3:50 AM
courbet updated this revision to Diff 249889.Mar 12 2020, 3:50 AM

clang-format

Harbormaster completed remote builds in B48963: Diff 249889.

A few nits.

MicroBenchmarks/MemFunctions/main.cpp
27

It's not super clear what "the real memcmp" means here. Maybe something along those lines:

// This function prevents the compiler from interfering with `memcmp` and makes sure the function is called.
57

Maybe it's worth instantiating the predicate object and use it as a functor.
It would help readability.

courbet updated this revision to Diff 249912.Mar 12 2020, 5:38 AM
courbet marked 2 inline comments as done.

address comments

Thanks, PTAL.

MicroBenchmarks/MemFunctions/main.cpp
57

Actually there is no reason to create an instance. I made the function static.

gchatelet accepted this revision.Mar 12 2020, 6:35 AM
This revision is now accepted and ready to land.Mar 12 2020, 6:35 AM

Do you still want to submit this patch?

courbet closed this revision.May 29 2020, 5:16 AM

Actually this was submitted but did not get updated for some reason.