-
Notifications
You must be signed in to change notification settings - Fork 444
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
Improve generation of unique strings #3350
Conversation
This change will cause hundreds of files generated by the compiler to change, cause the corresponding tests to change. |
Is there any way how to autoregenerate outputs for failed tests? |
@davidbolvansky re-run failed tests (or whole test-suite) with We have just seen real P4 program which takes hours to compile. The source program is large, and is additionally inflated by some midend transformations used in our backend. The typeChecking on huge IRs then becomes realy slow. If we don't want to change all the identifiers, we could also implement the unique string generation in typeChecking manually. Maintaining |
Ok, to reduce test churn, I implemented other approach based on the usage of references to counters, as suggested by Vojta. For every name, we track how many times it was used as a "base" for newly generated strings. |
Indeed, the compiler has not really been designed to be fast. I am not sure how much we can fix this now. |
Yeah, I will document it soon. |
Understood, but there are low hanging fruits (like this one) which can improve compile times a lot. We have a program where better unique string generation improves compile time significatly (2-3 hours -> 5 min). |
No description provided.