New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose TargetLibraryInfo pass #934
Conversation
ffi/targets.cpp
Outdated
LLVMPassManagerRef PM) { | ||
unwrap(PM)->add(new TargetLibraryInfoWrapperPass(*unwrap(TLI))); | ||
API_EXPORT(void) | ||
LLVMPY_AddTargetLibraryInfoImpl(const char *TripleStr, LLVMPassManagerRef PM) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this Impl
? Most of the other passes have Pass
as a suffix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed in 1880582
llvmlite/binding/passmanagers.py
Outdated
@@ -911,6 +914,8 @@ def run_with_remarks(self, function, remarks_format='yaml', | |||
ffi.lib.LLVMPY_AddSROAPass.argtypes = [ffi.LLVMPassManagerRef] | |||
ffi.lib.LLVMPY_AddTypeBasedAliasAnalysisPass.argtypes = [ffi.LLVMPassManagerRef] | |||
ffi.lib.LLVMPY_AddBasicAliasAnalysisPass.argtypes = [ffi.LLVMPassManagerRef] | |||
ffi.lib.LLVMPY_AddTargetLibraryInfoImpl.argtypes = [c_char_p, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the other pass functions take the pass manager as the first argument. Please swap the arguments to be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 1880582
- Rename LLVMPY_AddTargetLibraryInfoImpl to LLVMPY_AddTargetLibraryInfoPass. - Reorder it's arguments to match other similar functions.
Needed for numba/numba#8898