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

[LowerFormalToHW] Avoid applyPatternsGreedily, NFCI #8088

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

uenoku
Copy link
Member

@uenoku uenoku commented Jan 15, 2025

LowerFormalToHW used applyPatternsGreedily on ModuleOp but that is overkill for what LowerFormalToHW does. Since applyPatternsGreedily is called on ModuleOp, canonicalizations are executed in a single thread and LowerFormalToHW consumed non-trivial amount of time in large designs.

This commit simply replaces RewriterPattern with a helper function and call it manually.

Should fix #8035.

LowerFormalToHW used `applyPatternsGreedily` on ModuleOp but
that is overkill for what LowerFormalToHW does. `applyPatternsGreedily`
is called on ModuleOp so canonicalizations are executed in a single
thread.

This commit simply replaces RewriterPattern with a helper function and
call it manually.
Seems like I messed up when replacing the code.
@uenoku uenoku merged commit 65c4186 into llvm:main Jan 15, 2025
4 checks passed
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.

firtool -disable-opt runs folders (via LowerFormalToHW)
2 participants