-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Allow splicing constants into @code_warntype
to represent constant propagation
#25305
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
Comments
That’s just the code_warntype behavior, IPO (inter-procedural) requires that you actually have an outer proceedure to infer between. |
How do we verify that it is working? |
Here's a test case showing the difference between 0.6.2 and 0.7.
On 0.6, you get this:
However, on 0.7 the constant is propagated into
I believe this is the IPO, but I'm not an expert. |
Thanks @aaowens, I'm certainly no IPO expert either. Does this then not raise the need for some kind of |
Not necessarily. You know it’s working the same way you know any other optimization is working: trust, but verify, with |
Speaking with @Keno in the Slack, it would make sense if |
Reopen to implement the splicing syntax here. |
@code_warntype
to represent constant propagation
As proposed here, this would introduce a bit of a strange disconnect with |
Not into |
Ref: #24362
Hi all, the above Ref is was to merge IPO constant propagation, but this still doesn't
seem to be working. The following code compiles conditionally with
Val{B}
But not conditionally with
B::Bool
I used it with Julia
0.7.0-dev
downloaded today, so its the latest compiler.Thank you.
The text was updated successfully, but these errors were encountered: