Skip to content

Conversation

@aschackmull
Copy link
Contributor

The SSA predicate getALastRead is entirely unused. Presumably this was needed in the past for proper implementation of out and ref nodes in C#, but this is now handled via pseudo-reads.
This PR deprecates all involved predicates (or deletes in the case of Rust). This means that the ExitBasicBlock in the InputSig is effectively unused, so a second commit deletes that.

@aschackmull aschackmull added the no-change-note-required This PR does not need a change note label Feb 10, 2025
Copilot AI review requested due to automatic review settings February 10, 2025 13:40
@aschackmull aschackmull requested review from a team as code owners February 10, 2025 13:40
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 reviewed 20 out of 20 changed files in this pull request and generated no comments.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

/** Same as `lastRefRedef`, but skips uncertain reads. */
pragma[nomagic]
private predicate lastRefSkipUncertainReadsExt(DefinitionExt def, SsaInput::BasicBlock bb, int i) {
deprecated private predicate lastRefSkipUncertainReadsExt(

Check warning

Code scanning / CodeQL

Missing QLDoc for parameter Warning

The QLDoc has no documentation for bb, or def, or i, but the QLDoc mentions lastRefRedef
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, one comment.

)
}

cached
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's OK to replace this with pragma[nomagic]; I highly doubt anyone actually calls this.

*/
cached
predicate lastRead(Definition def, VariableReadAccessCfgNode read) {
deprecated predicate lastRead(Definition def, VariableReadAccessCfgNode read) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same.

@aschackmull aschackmull merged commit e1c810a into github:main Feb 11, 2025
55 checks passed
@aschackmull aschackmull deleted the ssa/deprecate-deadcode branch February 11, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C# C++ DataFlow Library JS no-change-note-required This PR does not need a change note Ruby Rust Pull requests that update Rust code Swift

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants