-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Clear GTF_ASG from non-stores in rationalize #10946
Conversation
Since rationalization hoists comma antecedents out into separate statements, any side-effects that the antecedent had might no longer apply to the comma's ancestor nodes. Moreover, in LIR, side-effect flags need only describe the immediate node; summary flags are computed when Ranges are constructed. So, update rationalize to clear the `GTF_ASG` flag from any node that is not a store. Failure to do so gives an overly-conservative view of side-effects, which can inhibit dead store removal. Fixes #9633.
Is there any measurable throughput impact from this change? |
/cc @dotnet/jit-contrib In addition to removing the three redundant loads noted in #9633 from
Here's an example diff, from Before: G_M8781_IG02:
mov rdx, qword ptr [rdi]
mov rdx, qword ptr [rdx+48]
mov rdx, qword ptr [rdx]
mov rdx, qword ptr [rdx+72]
mov rdx, gword ptr [rsi]
mov rcx, rdi
call Dictionary`2:FindEntry(ref):int:this After: G_M8781_IG02:
mov rdx, qword ptr [rdi]
mov rdx, gword ptr [rsi]
mov rcx, rdi
call Dictionary`2:FindEntry(ref):int:this |
@dotnet-bot test Windows_NT x64 throughput |
@JosephTremoulet while you're making these changes, would it be too much to ask to also clear the |
I'm happy to do that but would rather do the separate flags as separate changes since they could run into separate issues. |
Seems reasonable to me. |
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
LGTM as well |
I believe the TP results are well within measurement noise, but will have @dotnet-bot test Windows_NT x64 throughput again just to cross-check, and test Tizen armel Cross Release Build since the timeout is presumably unrelated. |
@dotnet-bot test this please |
Since rationalization hoists comma antecedents out into separate
statements, any side-effects that the antecedent had might no longer apply
to the comma's ancestor nodes. Moreover, in LIR, side-effect flags need
only describe the immediate node; summary flags are computed when Ranges
are constructed. So, update rationalize to clear the
GTF_ASG
flag fromany node that is not a store. Failure to do so gives an
overly-conservative view of side-effects, which can inhibit dead store
removal.
Fixes #9633.