Skip to content

The requirement to keep micro-ops dense while optimizing is harmful. #111646

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

Closed
markshannon opened this issue Nov 2, 2023 · 3 comments
Closed
Assignees

Comments

@markshannon
Copy link
Member

markshannon commented Nov 2, 2023

The tier 2 executor creation requires optimization passes to compact the micro-ops, which is onerous and error-prone.

We should make it part of the job of creating the executor to compact the micro-ops.
We will want to modify the tier 2 instruction format, so we will need to do this anyway at some point.

Linked PRs

@markshannon markshannon self-assigned this Nov 2, 2023
@mdboom
Copy link
Contributor

mdboom commented Nov 2, 2023

Can you elaborate on what you mean by "compact the microops"? Is this removing unnecessary microops and (perhaps) realloc'ing a smaller buffer and copying there?

@markshannon markshannon changed the title The requirement to keep micro-ops dense while optimization is harmful. The requirement to keep micro-ops dense while optimizing is harmful. Nov 2, 2023
@markshannon
Copy link
Member Author

Packing them together instead of leaving gaps.
So

Some uop
NOP
NOP
Another uop
JUMP to exit
# Junk here 
exit:
# More uops here

must be compacted to:

Some uop
Another uop
JUMP to exit
exit:
# More uops here

during optimization, rather than doing it once when creating the executor.

@mdboom
Copy link
Contributor

mdboom commented Nov 2, 2023

Thanks, that makes sense.

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

No branches or pull requests

2 participants