-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Ssa: Deprecate the unused getALastRead predicate. #18729
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
Conversation
There was a problem hiding this 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
There was a problem hiding this 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 |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
The SSA predicate
getALastReadis entirely unused. Presumably this was needed in the past for proper implementation ofoutandrefnodes 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
ExitBasicBlockin theInputSigis effectively unused, so a second commit deletes that.