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

Dialects: (csl) Simplify DSD types in IR #2683

Merged
merged 3 commits into from
Jun 3, 2024
Merged

Conversation

n-io
Copy link
Collaborator

@n-io n-io commented Jun 3, 2024

Simplify DSD types in IR by not carrying around element type information. Since this is only needed for the printing of @increment_dsd_offset(), we can provide a helper method instead to retrieve this information.

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.67%. Comparing base (6ef4760) to head (56e6e00).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2683      +/-   ##
==========================================
+ Coverage   89.64%   89.67%   +0.02%     
==========================================
  Files         364      364              
  Lines       46779    46871      +92     
  Branches     7090     7104      +14     
==========================================
+ Hits        41937    42031      +94     
+ Misses       3740     3739       -1     
+ Partials     1102     1101       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@n-io n-io requested review from dk949 and AntonLydike June 3, 2024 09:58
Copy link
Collaborator

@AntonLydike AntonLydike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I'm 100% on board here, doesn't this allow us to type-confuse an integer dsd for a float one and create "bad" code?

@dk949
Copy link
Collaborator

dk949 commented Jun 3, 2024

I think it's important to keep in mind that the type here is only used to denote size, using i32 should be the same as using f32 (no matter the underlying type).

If a DSD was a void *, it'd be equivalent to doing dsd = ((char *)dsd) + sizeof(T)

@n-io n-io merged commit 9ab90ac into main Jun 3, 2024
10 checks passed
@n-io n-io deleted the nicolai/simplify-dsd-ops branch June 3, 2024 15:00
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.

3 participants