-
Notifications
You must be signed in to change notification settings - Fork 31
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
remove :loopinfo from IR #154
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #154 +/- ##
==========================================
- Coverage 51.48% 51.48% -0.01%
==========================================
Files 27 27
Lines 2694 2696 +2
==========================================
+ Hits 1387 1388 +1
- Misses 1307 1308 +1
☔ View full report in Codecov by Sentry. |
@@ -185,6 +185,8 @@ function forward_visit!(ir::IRCode, ssa::SSAValue, order::Int, ssa_orders::Vecto | |||
recurse(stmt) | |||
elseif isexpr(stmt, :code_coverage_effect) | |||
return | |||
elseif isexpr(stmt, :loopinfo) #TODO preserve this properly |
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.
It's not legal to preserve.
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.
It can't be outright preserved but we might be able to do something with this infromation
# Can't trust that meta annotations are still valid in the AD'd | ||
# version. | ||
return nothing | ||
else | ||
#TODO put guard here. We really don't want invalid IR |
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 is not in general invalid IR
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.
The proposal here is rather that we assert that this is only getting various kinds of literals to wrap in a ZeroBundle
(be they functions or numbers etc)
and if not give a good error message, rather than generating invalid IR.
fixes
Diffractor.PrimeDerivativeFwd(x->prod([x, 4]))(3)
. (with help from @oxinabox)