Skip to content

Insertion of polling points (CFG)#1939

Merged
xclerc merged 7 commits intomainfrom
cfg-polling
Jun 19, 2024
Merged

Insertion of polling points (CFG)#1939
xclerc merged 7 commits intomainfrom
cfg-polling

Conversation

@xclerc
Copy link
Copy Markdown
Contributor

@xclerc xclerc commented Oct 17, 2023

(Early draft, with very little testing so far.)

@xclerc xclerc force-pushed the polling-instr branch 3 times, most recently from 2e0b10a to f915bf6 Compare December 8, 2023 11:46
Base automatically changed from polling-instr to main January 12, 2024 13:33
@mshinwell
Copy link
Copy Markdown
Collaborator

@gretay-js will review this one.

Copy link
Copy Markdown
Contributor

@gretay-js gretay-js left a comment

Choose a reason for hiding this comment

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

I compared Cfg_polling to Polling and they do the same thing, as far as I can tell, assuming correctness of Cfg_loop_infos.compute_back_edges, except on exceptional return from a function (easy fix, see comments).

  • Can you please rebase this PR? The old diff confusingly includes #1927 that has been merged.
  • Reminder about #2228. It becomes important for performance with runtime5 when we turn on poll insertion, as far as I remember from an upstream discussion (can't find the link, sorry). A small change around Cfg_to_linear.needs_starting_label is probably enough for backedges to implement it. If it's not obvious, we should at least have a comment there. We will of course do more benchmarking later, and if it turns out that this optimization is not significant, we can remove return_label from IPoll and simplify emit.mlp handling of IPoll.
  • Please port comments such as this from polling.ml to cfg_polling.ml
  • Does error handling need to be ported? I'm mostly worried about forgetting to copy report_error and register_error_of_exn over if we remove Polling . Maybe it's okay as is if there is a test that would fail. Alternatively, this PR can just move the shared code, including report_error, from Polling over to Cfg_polling.

@gretay-js gretay-js marked this pull request as ready for review May 23, 2024 15:41
@xclerc
Copy link
Copy Markdown
Contributor Author

xclerc commented Jun 18, 2024

Does error handling need to be ported?

It is not necessary because the exception in
Cfg_polling is really just a synonym for the
one in Polling.

@xclerc xclerc merged commit 19d0da7 into main Jun 19, 2024
@xclerc xclerc deleted the cfg-polling branch June 19, 2024 06:42
TheNumbat pushed a commit that referenced this pull request Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants