Skip to content

C++: Use local flow instead of GVN in getAdditionalFlowIntoCallNodeTerm - #12532

Merged
MathiasVP merged 5 commits into
github:mathiasvp/replace-ast-with-ir-use-usedataflowfrom
MathiasVP:local-flow-for-getAdditionalFlowIntoCallNodeTerm
Mar 15, 2023
Merged

C++: Use local flow instead of GVN in getAdditionalFlowIntoCallNodeTerm#12532
MathiasVP merged 5 commits into
github:mathiasvp/replace-ast-with-ir-use-usedataflowfrom
MathiasVP:local-flow-for-getAdditionalFlowIntoCallNodeTerm

Conversation

@MathiasVP

@MathiasVP MathiasVP commented Mar 15, 2023

Copy link
Copy Markdown
Contributor

This fixes a performance issue we've observed on a project, where the function was too complex for GVN to figure out that a parameter was used in a switch statement. This meant that the performance-mitigation measure we implemented in #12236 didn't kick in.

Commit-by-commit recommended. All the meat is in the first commit, and the second commit just moved things around for caching purposes.

We're losing a bunch of DCA results, but OTOH we're fixing a performance regression on a high-valued project. I'll create an internal issue to discuss how to get back some of these results.

@github-actions github-actions Bot added the C++ label Mar 15, 2023
Comment thread cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll Outdated
@MathiasVP
MathiasVP marked this pull request as ready for review March 15, 2023 14:02
@MathiasVP
MathiasVP requested a review from a team as a code owner March 15, 2023 14:02
@MathiasVP MathiasVP added the no-change-note-required This PR does not need a change note label Mar 15, 2023
Comment thread cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll Outdated

@jketema jketema left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. For clarity: we agreed that the slight loss in DCA results is acceptable at this point and something we can revisit later.

@MathiasVP
MathiasVP merged commit dffde8f into github:mathiasvp/replace-ast-with-ir-use-usedataflow Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C++ no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants