[PATCH] D62358: [SimplifyLibCalls] Fold more fortified builtin functions into their non-fortified variants when possible

Erik Pilkington via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 17:12:06 PDT 2019


erik.pilkington created this revision.
erik.pilkington added reviewers: jfb, george.burgess.iv, majnemer.
Herald added subscribers: dexonsmith, jkorous, hiraditya.
Herald added a project: LLVM.

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!


Repository:
  rL LLVM

https://reviews.llvm.org/D62358

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62358.201100.patch
Type: text/x-patch
Size: 49378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190524/dd662827/attachment-0001.bin>


More information about the llvm-commits mailing list