Skip to content
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

Merged
merged 2 commits into from
May 22, 2023
Merged

remove :loopinfo from IR #154

merged 2 commits into from
May 22, 2023

Conversation

oscardssmith
Copy link
Member

@oscardssmith oscardssmith commented May 22, 2023

fixes Diffractor.PrimeDerivativeFwd(x->prod([x, 4]))(3). (with help from @oxinabox)

@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Patch coverage: 33.33% and project coverage change: -0.01 ⚠️

Comparison is base (99cf2ee) 51.48% compared to head (33c922d) 51.48%.

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     
Impacted Files Coverage Δ
src/codegen/forward_demand.jl 38.42% <0.00%> (-0.36%) ⬇️
src/codegen/forward.jl 94.93% <100.00%> (+1.26%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -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
Copy link
Collaborator

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.

Copy link
Member

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
Copy link
Collaborator

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

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants