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

updated cmm_helpers interface to be more amenable to adding other int sizes #3415

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jvanburen
Copy link
Contributor

This is to prepare for adding small integer types
This just changes the interface - it doesn't really update any code.

The only code change is in safe_div_bi, instead of taking an integer size, it explicitly takes an optional flag that tells us whether division could overflow. This is not only more clear, but the function is only used in a couple places so it's easy to verify that the new behavior is correct.

@jvanburen jvanburen requested a review from mshinwell December 30, 2024 17:03
@jvanburen jvanburen force-pushed the generalize-cmm-helpers-interface branch from b24c541 to 1746aa8 Compare December 31, 2024 14:25
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.mli Show resolved Hide resolved
backend/cmm_helpers.mli Show resolved Hide resolved
backend/cmm_helpers.mli Outdated Show resolved Hide resolved
backend/cmm_helpers.mli Outdated Show resolved Hide resolved
middle_end/flambda2/to_cmm/to_cmm_primitive.ml Outdated Show resolved Hide resolved
@mshinwell mshinwell added the cmm Cmm language / helpers changes label Jan 15, 2025
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.mli Outdated Show resolved Hide resolved
backend/cmm_helpers.mli Outdated Show resolved Hide resolved
utils/misc.mli Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
backend/cmm_helpers.ml Show resolved Hide resolved
backend/cmm_helpers.ml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmm Cmm language / helpers changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants