Uh oh!
There was an error while loading. Please reload this page.
Cache allregs to avoid checking the type repeatedly - #76850
Conversation
ghost
commented
Oct 11, 2022
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue Detailsnull
|
kunalspathak
commented
Oct 12, 2022
@dotnet/jit-contrib |
SingleAccretion
commented
Oct 12, 2022
What's up with the regressions on x86? |
kunalspathak
commented
Oct 12, 2022
jakobbotsch
commented
Oct 12, 2022
SingleAccretion
commented
Oct 12, 2022
Note it is present in Windows x86/MinOpts benchmarks / CG collections as well. |
jakobbotsch
commented
Oct 12, 2022
I wonder if it's because it makes |
kunalspathak
commented
Oct 13, 2022
Ok, yeah I am still learning that I have to expand those details :) Tried inlining the |
kunalspathak
commented
Nov 14, 2022
Still need to do the TP regression analysis for MinOpts. |
kunalspathak
commented
Dec 8, 2022
Ping to myself. |
kunalspathak
commented
Jan 9, 2023
Hoping to review the TP analysis soon. |
The biggest diffs in MinOpts for benchmarks on windows/x64 are these. I will investigate more. -22555 : ??$varTypeIsSIMD@W4var_types@@@@YA_NW4var_types@@@Z+193049 : ??$varTypeIsSIMD@W4var_types@@@@YA_NW4var_types@@@Z-460532 : ??0LinearScan@@QEAA@PEAVCompiler@@@Z+942354 : ??0LinearScan@@QEAA@PEAVCompiler@@@Z |
kunalspathak
commented
Jan 9, 2023
kunalspathak
commented
Jan 9, 2023
/azp run runtime-coreclr superpmi-diffs |
|
Azure Pipelines successfully started running 1 pipeline(s). |
kunalspathak
commented
Jan 10, 2023
The latest run doesn't have any benchmarks regression. It just has TP regression on crossgen2 and I tried to eliminate some of that by eliminating the call to Here is the latest and I don't think there is anything much that can be done: |
@kunalspathak What if you change the initialization of the table to: for (unsignedint i = 0; i < TYP_COUNT; i++)
{
availableRegs[i] = &availableIntRegs;
}
availableRegs[TYP_FLOAT] = &availableFloatRegs;
availableRegs[TYP_DOUBLE] = &availableDoubleRegs;
#ifdef FEATURE_SIMD
availableRegs[TYP_SIMD8] = &availableDoubleRegs;
availableRegs[TYP_SIMD12] = &availableDoubleRegs;
availableRegs[TYP_SIMD16] = &availableDoubleRegs;
availableRegs[TYP_SIMD32] = &availableDoubleRegs;
#endifIn any case it still looks minor to me. |
kunalspathak
commented
Jan 10, 2023
That's a reasonable approach, but as I mentioned earlier, this is This was a good exercise for me to learn how to analyze TP regression locally. |





Cache the
availableRegsin a table that we can look-up and return instead of comparing the type every single time inallRegs()method. Gives a nice TP: