[PATCH] D42047: Pattern matching code for LibFunc
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 17 10:48:22 PDT 2018
efriedma added inline comments.
================
Comment at: include/llvm/IR/PatternMatch.h:1648
+ if (TLI.has(F) && CI->isNoBuiltin())
+ return TLI.getName(F) == CalledF->getName();
+ return false;
----------------
Please use `TargetLibraryInfo::getLibFunc(ImmutableCallSite CS, LibFunc &F)` when possible, so we can avoid scattering validity checks all over the code. (This formulation misses the call to isValidProtoForLibFunc.)
https://reviews.llvm.org/D42047
More information about the llvm-commits
mailing list