-
Notifications
You must be signed in to change notification settings - Fork 12
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
Extractor that removes dead code in if inputs #712
Conversation
CI seems to time out |
7a3f541
to
df21ada
Compare
c77aefb
to
9300d42
Compare
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.
Great work! There are still many details I don't understand, but looking at the snapshots and tests, I tentatively approve so that merging is not blocked. Does this PR make the nightly numbers better?
let mut node_to_type: IndexMap<ClassId, Type> = Default::default(); | ||
|
||
for (term, node_id) in &self.correspondence { | ||
for (term, node_id) in &self.correspondence.clone() { |
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.
Is compute_eclass_types
only called once so this clone is acceptable? Can we get rid of this clone?
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.
good question, but probably not blocking
busy writing paper!
Doesn't make the nightly numbers better but does help with Anjali's examples in the overview |
This PR adds a special case to the extractor that adds "DeadCode" nodes to the resulting AST
Then, a new pass removes these dead code expressions
It also adds typechecking between compiler passes to catch more bugs