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

Compute presence of calls after possibly removing poll instruction (CFG selection) #3519

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

xclerc
Copy link
Contributor

@xclerc xclerc commented Jan 28, 2025

Support for polling on the CFG selection pipeline
was added at the very end, and unfortunately
introduced a bug. The way polling was added
was to first unconditionally add a polling point
at the top of the function, and later remove it
if it happens to not be needed.

The bug stems from the fact we determine
whether there are calls in the function after
adding the polling point but before removing
it if unnecessary. The consequence is that we
will require frames everywhere.

This pull request fixes the issue by determining
whether calls are present at the very end. This
is not very satisfactory, but as noted in a CR we
should revisit the way we are inserting polling
point. In the meantime, I think it is better to
simply fix the issue with this unintrusive pull
request.

@xclerc xclerc added bug Something isn't working cfg labels Jan 28, 2025
@xclerc xclerc merged commit 9e9e914 into main Jan 28, 2025
24 checks passed
@xclerc xclerc deleted the fix-cfg-selection-frames branch January 28, 2025 18:16
Svetlitski pushed a commit to Svetlitski/flambda-backend that referenced this pull request Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cfg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants