[PATCH] D33737: [InstSimplify] Don't constant fold or DCE calls that are marked nobuiltin

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 13:37:52 PDT 2017


efriedma edited reviewers, added: efriedma; removed: eli.friedman.
efriedma added a comment.

Would it be possible to pass in a CallSite to canConstantFoldCallTo, ConstantFoldCall, and SimplifyCall, to reduce the number of places we check this?



================
Comment at: lib/Analysis/ConstantFolding.cpp:2076
   LibFunc Func;
   if (!TLI || !TLI->getLibFunc(*F, Func))
     return false;
----------------
Would it make sense to add an overload of getLibFunc() which takes a CallSite?


Repository:
  rL LLVM

https://reviews.llvm.org/D33737





More information about the llvm-commits mailing list