Simplify arithmetic operations on registry and memory#125559
Simplify arithmetic operations on registry and memory#125559pedrobsaila wants to merge 9 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
haven't checked the correctness of these changes, but the diffs imply that +300 LOC to JIT are not worth it. |
|
There is room to reduce LOC, I just wrote it fast to see whether their will be asm diffs or not. I'll roll more compact version in a few hours. But I agree the diffs are not that impressive. |
Right. Generally, we don't accept PRs like that unless there is a strong justification. We see it as an extra risk that is not worth the impact. To be honest, all kinds of |
Sorry to bother you, but never worked on VN/SSA level, I need to ask you about which file the transformation should be valuenum.cpp/ssabuilder.cpp or elsewhere ? |
I just tried myself with VN and it didn't find diffs either (mostly because we don't materialize VNs today). With SSA it's probably a more advanced task. probably like in copyprop or assertionprop, but it might also not worth it - hard to tell in advance. |
|
Do we have any info on whether the lack of diffs is because this is pattern is uncommon in all code or simply uncommon in the code that we have SPMI diffs around (i.e. corelib and partner frameworks/apps that tend to be a bit more explicit about our patterns)? |
|
The ASM diffs seems better when transformation is moved to SSA (assertionprop.cpp), see #125885 |
Fixes #125300
Lacks tests, working on it
Before :
After: