This is an archive of the discontinued LLVM Phabricator instance.

[BuildLibCalls] Add argmemonly, writeonly, nounwind to memset_chk.
ClosedPublic

Authored by fhahn on Nov 30 2021, 6:00 AM.

Details

Summary

The memset_chk library function should match memset's attributes with
respect of memory effects (argmemonly, writeonly). It also does not
raise exceptions. It may not return, in case it aborts the program.

Diff Detail

Event Timeline

fhahn created this revision.Nov 30 2021, 6:00 AM
fhahn requested review of this revision.Nov 30 2021, 6:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 30 2021, 6:00 AM
xbolva00 added inline comments.Nov 30 2021, 6:08 AM
llvm/lib/Transforms/Utils/BuildLibCalls.cpp
464

Maybe also improve this?

fhahn marked an inline comment as done.Nov 30 2021, 1:57 PM
fhahn added inline comments.
llvm/lib/Transforms/Utils/BuildLibCalls.cpp
464

Im planning on a similar treatment for memcpy_chk if the memset_chk changes make sense :)

This revision is now accepted and ready to land.Nov 30 2021, 2:18 PM
This revision was landed with ongoing or failed builds.Dec 1 2021, 2:10 AM
This revision was automatically updated to reflect the committed changes.
fhahn marked an inline comment as done.
fhahn added inline comments.Dec 1 2021, 4:00 AM
llvm/lib/Transforms/Utils/BuildLibCalls.cpp
464

I put up D114863