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

[Stream][NFC] Iterate over blocks to find return op #19791

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

IanWood1
Copy link
Contributor

auto anyReturnOp = *op.getOps<IREE::Util::ReturnOp>().begin(); is expensive when op contains lots of ops to traverse before finding a return op. Instead, look at each contained block for a return op.

On 405b sharded, this reduces compile time from 2min -> 10sec for this pass

Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
Copy link
Collaborator

@benvanik benvanik left a comment

Choose a reason for hiding this comment

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

nice! thanks! one small style nit

@IanWood1 IanWood1 marked this pull request as ready for review January 23, 2025 20:21
@IanWood1 IanWood1 changed the title [NFC] Iterate over blocks to find return op [Stream][NFC] Iterate over blocks to find return op Jan 23, 2025
@IanWood1 IanWood1 merged commit af54fd2 into iree-org:main Jan 23, 2025
40 checks passed
@ScottTodd
Copy link
Member

Great work on these compile time improvements!

Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
@ScottTodd ScottTodd mentioned this pull request Feb 7, 2025
6 tasks
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.

3 participants