Skip to content

Conversation

@aschackmull
Copy link
Contributor

The first commit contains the primary change: The VariableCapture library is updated to use the DataFlowIntegration module instead of direct references to phi-read nodes. The nested SSA instantiation causes a little bit of caching, so I make sure to collapse those stages with parts of VariableCapture that would otherwise be duplicated across several stages. This ensures that we maintain the same number of cached stages (as the nested SSA already introduces a stage), and I think it also ought to be a mostly strict reduction of cross-stage DIL duplication.

The subsequent 2 commits are simple SSA cleanups.

@aschackmull aschackmull added the no-change-note-required This PR does not need a change note label Mar 31, 2025
Copilot AI review requested due to automatic review settings March 31, 2025 08:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (2)
  • shared/dataflow/codeql/dataflow/VariableCapture.qll: Language not supported
  • shared/ssa/codeql/ssa/Ssa.qll: Language not supported

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

@aschackmull aschackmull requested review from a team as code owners March 31, 2025 09:45
@github-actions github-actions bot added Java Rust Pull requests that update Rust code Swift labels Mar 31, 2025
@@ -1,2 +0,0 @@
identityLocalStep
| main.rs:442:9:442:20 | phi(default_name) | Node steps to itself |
Copy link
Contributor

Choose a reason for hiding this comment

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

I can see corresponding results - a big decrease in data flow inconsistencies - in the DCA run for Rust. ✨

The Swift DCA run shows an analysis slowdown, which is likely noise, but big enough I wouldn't mind a re-run to confirm nothing is wrong there. Other than than the Rust and Swift DCA runs LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The swift analysis slowdowns appear to be mostly on the order of the corresponding stddev values, so I expect it to be noise. But I've started a re-run, so we get another round of numbers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, looks like the Swift slowdown is at least somewhat consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although, it's not that consistent which projects exhibit slowdowns, so the results definitely are noisy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I cannot reproduce any perf issues locally.

Copy link
Contributor

Choose a reason for hiding this comment

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

In my experience, the Swift DCA analysis timings are completely useless (wdyt @redsun82 ?)

Copy link
Contributor

Choose a reason for hiding this comment

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

unfortunately it's hard to get consistent timings from macOS runners, so I think those can be ignored

Copy link
Contributor

Choose a reason for hiding this comment

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

The slowdowns being in different projects is good evidence this is noise to me. 👍

Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

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

LGTM

@aschackmull aschackmull merged commit 47b1c3d into github:main Apr 2, 2025
41 checks passed
@aschackmull aschackmull deleted the ssa/variablecapture branch April 2, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DataFlow Library Java no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code Swift

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants