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

[ExportVerilog] Consider to cache results of isExpressionUnableToInline #2489

Open
uenoku opened this issue Jan 21, 2022 · 2 comments
Open

Comments

@uenoku
Copy link
Member

uenoku commented Jan 21, 2022

isExpressionUnableToInline(op) checks all users to determine the given operation is allowed to emit inline.
I haven't done proper profiling but it might be possible to speed up ExportVerilog by cacheing the result of isExpressionUnableToInline.

@uenoku uenoku changed the title [ExportVerilog] Consider to cache the result of isExpressionUnableToInline [ExportVerilog] Consider to cache results of isExpressionUnableToInline Jan 21, 2022
@lattner
Copy link
Collaborator

lattner commented Jan 21, 2022

Yeah this is a significant amount of compile time. Instead of caching, is there a better algorithm to use here that isnt' quadratic?

@uenoku
Copy link
Member Author

uenoku commented Jan 21, 2022

Yeah this is a significant amount of compile time. Instead of caching, is there a better algorithm to use here that isnt' quadratic?

I agree. Currently, we are looking at users from operation, but we can make the direction opposite;
walk every operation and mark operands if the operation violates inlinng rule. The logic might become more complicated though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants