Remove InitializeNonlocalInstruction#4558
Merged
dbartol merged 10 commits intogithub:mainfrom Nov 19, 2020
Merged
Conversation
added 2 commits
October 21, 2020 12:12
Instead, have AliasedDefinition initialize read-only nonlocal memory
The conflation-related changes result from aliased accesses for which a precise Phi node is generated.
jbj
reviewed
Oct 28, 2020
Contributor
jbj
left a comment
There was a problem hiding this comment.
It's great to see that this diff takes away more than it adds.
cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasedSSA.qll
Outdated
Show resolved
Hide resolved
Contributor
|
Yay for fewer instructions 🎉 ! Apparently, GitHub doesn't allow comments on collapsed lines, so I'm leaving this as a comment instead: I guess now that we no longer have an override predicate canDefineReadOnly() {
// A "must" access that defines all non-local memory appears only on the `InitializeNonLocal`
// instruction, which provides the initial definition for all memory outside of the current
// function's stack frame. This memory includes string literals and other read-only globals, so
// we allow such an access to be the definition for a use of a read-only location.
not isMayAccess()
} |
Contributor
Author
|
Yeah, I think I can just make that |
Contributor
|
The tests are passing. Is it time to take this out of draft mode? |
Removes the IR consistency checks for conflated memory and marks instructions that have a conflated result with a percent sign (%) instead. This avoids reimplementing part of the alias analysis logic in the consistency check.
Accept test changes from IR temporaries and block ordering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes
InitializeNonlocalInstructionfrom the IR, which should result in a small performance improvement in building the IR. I think the consistency checks need to be adjusted to handle phi nodes for global and static variables which don't have their address taken, but I'm not sure exactly how to identify those.