-
Notifications
You must be signed in to change notification settings - Fork 171
Fixing & for C backend #1057
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
Fixing & for C backend #1057
Conversation
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.
This looks good, thanks for the fix!
Signed-off-by: Ron Nuriel <[email protected]>
Signed-off-by: Ron Nuriel <[email protected]>
f21ddd7
to
693ed9f
Compare
@ronnuriel I merged the first two commits, and also added a new commit (693ed9f) that updates the reference tests, I just did:
and committed. |
@@ -4,13 +4,23 @@ | |||
def add(x: i32, y: i32) -> i32: | |||
return x + y | |||
|
|||
@inline | |||
def and_op(x: i32, y: i32) -> i32: |
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 see. I think this feature isn't available in LLVM backend yet (will confirm though). I will add the same (after confirming).
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.
Go for it. Tests pass, but I assume LLVM ignores it.
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.
Well I am wondering if we should use the function inline pass for this. A function will be inlined in LLVM backend if it's decorated with @inline
. Make sense?
In --fast
flag all functions (provided they satisfy some conditions) are anyways inlined automatically.
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.
Yes. LLVM ignores this decorator. Making it work via function inline pass.
Signed-off-by: Ron Nuriel [email protected]