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.
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
JIT: Do not propagate some constants #70378
JIT: Do not propagate some constants #70378
Changes from 1 commit
593a3ec
72ab579
83fc086
d81b195
1d076dd
0274989
69e4d1d
3920a54
7873570
bc40d08
eaede4e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Style nit:
lvaTable[lclNum].
->lvaGetDesc(lclNum)->
.General comment on the algorithm: this walks only one step up in the def chain, so if we have something like this:
We will still propagate
const
toUse
.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.
@SingleAccretion I don't see why it would.
When we're at Use(b) and we query SsaData()->Block from b we get
a
's Block and it leads to "avoid propagating" pathThere 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.
Ah, actually for your case
b
is going to be replaced witha
in an earlier phaseVN based copy prop
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.
If I annotate this with blocks:
I am pretty sure that when we query the def block for
b:u:1
, we'd getBB02
, since the defb:d:1
occurs inside it.I agree that copy propagation helps us here; not sure by how much because of the liveness constraints it has.
In any case, I also agree that there is no reason, for now, to complicate the code with a full UD chain walk, because we are pretty much targeting people hoisting constants out of loops by hands.