Provides m_LibFunc pattern that can be used to match LibFuncs.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Up. I guess it still needs to be merged as it introduces pattern matching for LibFuncs that would be quite usefull.
I have not seen that this header is explicitly tested, but it can be tested througn some libFunc pattern matches, as I hope to introduce some using this
include/llvm/IR/PatternMatch.h | ||
---|---|---|
1648 ↗ | (On Diff #155831) | 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.) |
I don't see that all patterns are tested in that file. Instead, patterns are tested implicitly in optimization transforms.
Almost there i think..
unittests/IR/PatternMatch.cpp | ||
---|---|---|
637–645 ↗ | (On Diff #207042) | Nice. |
(no new comments - still looks ok other than lack of at least one negative test - just marking as reviewed)
include/llvm/IR/PatternMatch.h | ||
---|---|---|
1802 ↗ | (On Diff #209129) | Does TLI.getLibFunc() check NoBuiltin internally? |