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 201100 llvm/include/llvm/Analysis/TargetLibraryInfo.def
llvm/include/llvm/Transforms/Utils/BuildLibCalls.h
llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h
llvm/lib/Analysis/TargetLibraryInfo.cpp
llvm/lib/Transforms/Utils/BuildLibCalls.cpp
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InstCombine/fortify-folding.ll
llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
|
Any reason you didn't add comments here?