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

Pass [AOT]TraceIterator to compiler backends #961

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

ltratt
Copy link
Contributor

@ltratt ltratt commented Feb 8, 2024

This PR allows compiler backends to obtain AOT blocks one-by-one, potentially allowing tracers to put trace process (e.g. hwt decoding) in a thread (c8ea235). That made me realise that TraceIterator is a slightly suboptimal name so I've suggested changing it to AOTTraceIterator (1ea1014).

This allows the JIT compilers, if they so choose, to iterate over the
blocks. If a tracer chooses to process (e.g. decode) its trace in a
thread, this means that (some of) compilation and trace processing can
occur in parallel.

At the moment, this commit doesn't change anything meaningful inside
jitc_ykllvm or jitc_yk: both immediately `collect` the iterator into a
`Vec`. But the API is now flexible enough to allow something better in
the future.
Since we have more than one type of "trace", it's easy to get confused
when reading the code as to which one is looking at. Since
`TraceIterator` returns `TracedAOTBlock`, renaming the iterator to
`AOTTraceIterator` seems sensible.
@vext01 vext01 added this pull request to the merge queue Feb 8, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 8, 2024
@vext01 vext01 added this pull request to the merge queue Feb 8, 2024
@vext01 vext01 removed this pull request from the merge queue due to a manual request Feb 8, 2024
@vext01 vext01 added this pull request to the merge queue Feb 8, 2024
Merged via the queue into ykjit:master with commit efcf3e5 Feb 8, 2024
2 checks passed
@ltratt ltratt deleted the pass_traceiterator branch March 30, 2024 09:13
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