[PATCH] D33737: [InstSimplify] Don't constant fold or DCE calls that are marked nobuiltin
Andy Kaylor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 31 13:27:30 PDT 2017
andrew.w.kaylor created this revision.
Herald added subscribers: eraman, mzolotukhin.
There were a number of places that calls to math library functions were being constant folded or DCE'd without regard to the nobuiltin attribute. This patch attempts to fix that.
The actual constant folding happens in a central location, but the callsite is no longer accessible at that point (and possibly shouldn't be) so I had to add the checks in a number of places where ConstantFoldCall is called.
Repository:
rL LLVM
https://reviews.llvm.org/D33737
Files:
lib/Analysis/ConstantFolding.cpp
lib/Analysis/InlineCost.cpp
lib/Analysis/InstructionSimplify.cpp
lib/Analysis/ScalarEvolution.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/Utils/Evaluator.cpp
test/Transforms/DCE/calls-errno.ll
test/Transforms/InstCombine/constant-fold-libfunc.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33737.100910.patch
Type: text/x-patch
Size: 6034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170531/b097ee2a/attachment.bin>
More information about the llvm-commits
mailing list