C++: Make AST GVN a wrapper for IR-based GVN#2765
Merged
jbj merged 13 commits intogithub:masterfrom Feb 7, 2020
Merged
Conversation
rdmarsh2
suggested changes
Feb 5, 2020
Comment on lines
+26
to
+31
| min(Language::Location l | | ||
| l = getAnInstruction().getLocation() | ||
| | | ||
| l | ||
| order by | ||
| l.getFile().getAbsolutePath(), l.getStartLine(), l.getStartColumn(), l.getEndLine(), | ||
| l.getEndColumn() | ||
| ) |
Contributor
There was a problem hiding this comment.
We should exclude UnknownLocation if there are any expressions with known locations in the same GVN. Otherwise implicit this qualifiers on member accesses will cause the value number for the this pointer to have an UnknownLocation.
Contributor
Author
There was a problem hiding this comment.
Good catch. I've excluded UnknownLocations if there are any non-UnknownLocations now.
| final Location getLocation() { | ||
| result = | ||
| rank[1](Location l | | ||
| min(Location l | |
Contributor
There was a problem hiding this comment.
The same note applies re: UnknownLocation and implicit this qualifiers.
20a20d2 to
c39ca7c
Compare
…taining expressions from a GVN
…ce representation have a GVN
…ocation that's known
c39ca7c to
2017ca8
Compare
8162e87 to
538c2b2
Compare
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.
The PR in #2724 became quite messy with commits, so here's a fresh PR that should make it easier to follow the structure!