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

Make control-flow sensitive DFG pass configurable by complexity #1356

Merged
merged 5 commits into from
Nov 21, 2023

Conversation

oxisto
Copy link
Member

@oxisto oxisto commented Nov 16, 2023

This calculates a simple cylic complexity for functions and adds a configuration option to specify a max for the control-flow sensitive DFG pass.

This was causing MAJOR performance problems, since we are using the `hashCode` in the symbol resolver for caching. This had the effect that on deeply nested scopes, performance dropped quite largely.
This calculates a simple cylic complexity for functions and adds a configuration option to specify a max for the control-flow sensitive DFG pass.
@oxisto oxisto requested a review from konradweiss as a code owner November 16, 2023 11:15
@oxisto oxisto changed the base branch from main to scope-hashcode November 16, 2023 11:30
@oxisto oxisto changed the title cyclic complexity Make control-flow sensitive DFG pass configurable by complexity Nov 16, 2023
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

68.0% 68.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@oxisto oxisto merged commit 299d198 into scope-hashcode Nov 21, 2023
3 of 4 checks passed
@oxisto oxisto deleted the cyclic-complexity branch November 21, 2023 08:05
oxisto added a commit that referenced this pull request Nov 21, 2023
* Removed `parent` from `hashCode` of `Scope`

This was causing MAJOR performance problems, since we are using the `hashCode` in the symbol resolver for caching. This had the effect that on deeply nested scopes, performance dropped quite largely.

* Comparing scope in case of a cache hit to avoid collisions

* Make control-flow sensitive DFG pass configurable by complexity

This calculates a simple cylic complexity for functions and adds a configuration option to specify a max for the control-flow sensitive DFG pass.

* Extracted configuration in a more generic pass-specific config

* Added unit test
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.

2 participants