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

Use width_bits() instead of size for constantFolding #3400

Merged
merged 1 commit into from
Jun 21, 2022

Conversation

fruffy
Copy link
Collaborator

@fruffy fruffy commented Jun 20, 2022

width_bits fulfills the same functionality but can be overridden. This makes the pass a bit more flexible.

@fruffy fruffy force-pushed the constantfolding_width_bits branch from 0bca953 to e0bf49e Compare June 20, 2022 17:13
Copy link
Contributor

@mihaibudiu mihaibudiu left a comment

Choose a reason for hiding this comment

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

This will only help if you subclass Type_Bits.

@fruffy
Copy link
Collaborator Author

fruffy commented Jun 21, 2022

Yes, part of the reason this was added!

@fruffy fruffy merged commit f26b26e into p4lang:main Jun 21, 2022
@fruffy fruffy deleted the constantfolding_width_bits branch July 18, 2022 19:52
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.

2 participants