Provides m_LibFunc pattern that can be used to match LibFuncs.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 34059 Build 34058: arc lint + arc unit
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 | ||
---|---|---|
1641 | 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 | 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 | ||
---|---|---|
1788 | Does TLI.getLibFunc() check NoBuiltin internally? |
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.)