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

RFC: Remove handling of attributes #105

Merged
merged 1 commit into from
Oct 27, 2022
Merged

RFC: Remove handling of attributes #105

merged 1 commit into from
Oct 27, 2022

Conversation

langston-barrett
Copy link
Collaborator

@langston-barrett langston-barrett commented Oct 27, 2022

The API around attributes changed in LLVM 14. Rather than blindly upgrade the FactGenerator to continue to type-check, I realized that

  1. Attribute handling was probably already incomplete - I'm sure LLVM 10-13 added new attributes that I hadn't yet updated the schema and FactGenerator to account for.
  2. I wasn't really sure how attributes impacted the analysis.

I decided to try to delete everything related to attributes instead. The idea is that if we don't use them, they're just slowing everything down and adding a maintenance burden, even while we know that the current support isn't comprehensive (and thus not useful to e.g., other clients of the FactGenerator).

This appears to pass all of the tests, including the golden tests and EXTRA_TESTS. It's certainly possible that the analysis changes would impact the output on programs that do use the byval attribute and that we don't have enough coverage of these in the test suite. However, it seems comparably likely that some aspect of the LLVM language changed in a way that made this code not work the way it was intended to when it was originally written. See #104.

See also #26.

The API around attributes changed in LLVM 14. Rather than blindly upgrade the
FactGenerator to continue to type-check, I realized that

1. Attribute handling was probably already incomplete - I'm sure LLVM 10-13
   added new attributes that I hadn't yet updated the schema and FactGenerator
   to account for.
2. I wasn't really sure how attributes impacted the analysis.

I decided to try to delete everything related to attributes instead. The idea is
that if we don't use them, they're just slowing everything down and adding a
maintenance burden, even while we *know* that the current support isn't
comprehensive (and thus not useful to e.g., other clients of the FactGenerator).

This appears to pass all of the tests, including the golden tests and
`EXTRA_TESTS`. It's certainly possible that the analysis changes would impact
the output on programs that do use the `byval` attribute and that we don't have
enough coverage of these in the test suite. However, it seems comparably likely
that some aspect of the LLVM language changed in a way that made this code not
work the way it was intended to when it was originally written.
@langston-barrett langston-barrett self-assigned this Oct 27, 2022
@langston-barrett langston-barrett mentioned this pull request Oct 27, 2022
2 tasks
@langston-barrett
Copy link
Collaborator Author

@thinkmoore and I discussed offline and we aligned on this approach.

@langston-barrett langston-barrett merged commit 422d1a6 into main Oct 27, 2022
@langston-barrett langston-barrett deleted the lb/rm-attrs branch October 27, 2022 18:32
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.

1 participant