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

Refactor LVA and fix S1854 FP #5529

Merged
merged 7 commits into from
Apr 4, 2022
Merged

Conversation

pavel-mikula-sonarsource
Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource commented Mar 31, 2022

See #5527 description for motivation for this refactoring. There was a design issue that doesn't scale anymore in LVA.

Before:

Predecessors and Successors were computed independently for each block. On the fly. This required synchronization between these two methods to provide good results in loop scenarios.

The implementation wasn't completely symetrical.

After:

We compute each branch once and store it so it can be reused. We compute Successors for each block and store Predecessors and Successors from this pair. Ensuring that the graph will always be symmetrical in both directions.

Sice effect

Fixes #4949
because the old implementation wasn't completely symetrical.

@pavel-mikula-sonarsource pavel-mikula-sonarsource changed the title Migrate Successors Refactor LVA and fix S1854 FP Mar 31, 2022
@pavel-mikula-sonarsource pavel-mikula-sonarsource linked an issue Mar 31, 2022 that may be closed by this pull request
@pavel-mikula-sonarsource pavel-mikula-sonarsource changed the base branch from Pavel/LVA-NEstedFinally to master April 1, 2022 11:23
@pavel-mikula-sonarsource pavel-mikula-sonarsource marked this pull request as ready for review April 1, 2022 11:23
Copy link
Contributor

@csaba-sagi-sonarsource csaba-sagi-sonarsource left a comment

Choose a reason for hiding this comment

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

Left a couple of small comments, otherwise looks good.

@sonarcloud
Copy link

sonarcloud bot commented Apr 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarcloud
Copy link

sonarcloud bot commented Apr 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

97.4% 97.4% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@csaba-sagi-sonarsource csaba-sagi-sonarsource left a comment

Choose a reason for hiding this comment

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

LGTM!

@csaba-sagi-sonarsource csaba-sagi-sonarsource merged commit ea29ac4 into master Apr 4, 2022
@csaba-sagi-sonarsource csaba-sagi-sonarsource deleted the Pavel/LVA-Refactor branch April 4, 2022 08:10
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.

Fix S1854 FPs: Improve catch block links
2 participants