-
Notifications
You must be signed in to change notification settings - Fork 55
Fix inlining behaviour at the NVVM IR level #246
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -138,6 +138,7 @@ def __init__( | |
| debug=False, | ||
| lineinfo=False, | ||
| inline=False, | ||
| forceinline=False, | ||
| fastmath=False, | ||
| extensions=None, | ||
| max_registers=None, | ||
|
|
@@ -183,7 +184,7 @@ def __init__( | |
| self.argtypes, | ||
| debug=self.debug, | ||
| lineinfo=lineinfo, | ||
| inline=inline, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just double checking, since it is happening on LLVM IR level there is no need to pass
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, exactly - |
||
| forceinline=forceinline, | ||
| fastmath=fastmath, | ||
| nvvm_options=nvvm_options, | ||
| cc=cc, | ||
|
|
@@ -1087,7 +1088,7 @@ def compile_device(self, args, return_type=None): | |
| with self._compiling_counter: | ||
| debug = self.targetoptions.get("debug") | ||
| lineinfo = self.targetoptions.get("lineinfo") | ||
| inline = self.targetoptions.get("inline") | ||
| forceinline = self.targetoptions.get("forceinline") | ||
| fastmath = self.targetoptions.get("fastmath") | ||
|
|
||
| nvvm_options = { | ||
|
|
@@ -1105,7 +1106,7 @@ def compile_device(self, args, return_type=None): | |
| args, | ||
| debug=debug, | ||
| lineinfo=lineinfo, | ||
| inline=inline, | ||
| forceinline=forceinline, | ||
| fastmath=fastmath, | ||
| nvvm_options=nvvm_options, | ||
| cc=cc, | ||
|
|
||
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.
Do we want it to be bool, or we want to expose llvm IR attributes directly:
https://llvm.org/docs/LangRef.html#function-attributes
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.
I want it to be
boolso it's consistent with Numba. There is a plan for Numba to expose LLVM attributes directly, so I'll aim to align with that in future.