When the object size argument is -1, no checking can be done, so calling the _chk variant is unnecessary. We already did this for a bunch of these functions.
rdar://50797197
Thanks for taking a look!
Paths
| Differential D62358
[SimplifyLibCalls] Fold more fortified builtin functions into their non-fortified variants when possible ClosedPublic Authored by erik.pilkington on May 23 2019, 5:11 PM.
Details Summary When the object size argument is -1, no checking can be done, so calling the _chk variant is unnecessary. We already did this for a bunch of these functions. rdar://50797197 Thanks for taking a look!
Diff Detail
Event TimelineComment Actions I added some minor comments but other than that I think it is fine.
This revision is now accepted and ready to land.May 30 2019, 6:12 PM Closed by commit rL362272: [SimplifyLibCalls] Fold more fortified functions into non-fortified variants (authored by epilk). · Explain WhyMay 31 2019, 3:39 PM This revision was automatically updated to reflect the committed changes. erik.pilkington added inline comments.
Revision Contents
Diff 202499 llvm/trunk/include/llvm/Analysis/TargetLibraryInfo.def
llvm/trunk/include/llvm/Transforms/Utils/BuildLibCalls.h
llvm/trunk/include/llvm/Transforms/Utils/SimplifyLibCalls.h
llvm/trunk/lib/Analysis/TargetLibraryInfo.cpp
llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp
llvm/trunk/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/trunk/test/Transforms/InstCombine/fortify-folding.ll
llvm/trunk/unittests/Analysis/TargetLibraryInfoTest.cpp
|