This is an archive of the discontinued LLVM Phabricator instance.

[TargetLibraryInfo] memcpy and memset have optimized codegen.
ClosedPublic

Authored by courbet on Apr 28 2020, 3:40 AM.

Details

Summary

Add memcpy and memset to the list of function with optimized codegen.
hasOptimizedCodeGen() was returning false for them.
This was not an issue when working with c++ as clang typically emits an
intrinsic rather than a libfunc call, but when working with IR,
this would cause some issues with sanitizers which would not correctly
mark the function as nobuiltin in maybeMarkSanitizerLibraryCallNoBuiltin().

Diff Detail

Event Timeline

courbet created this revision.Apr 28 2020, 3:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2020, 3:40 AM
xbolva00 added inline comments.
llvm/include/llvm/Analysis/TargetLibraryInfo.h
353

Memmove?

courbet updated this revision to Diff 260587.Apr 28 2020, 4:17 AM

Add memmove

xbolva00 accepted this revision.May 8 2020, 10:11 AM
This revision is now accepted and ready to land.May 8 2020, 10:11 AM
This revision was automatically updated to reflect the committed changes.