Uh oh!
There was an error while loading. Please reload this page.
Arm64: Implement VectorTableLookup/VectorTableLookupExtension intrinsinsic + Consecutive registers support - #80297
Conversation
Some more cleanup
ghost
commented
Jan 6, 2023
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
ghost
commented
Jan 6, 2023
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsThis adds support for remaining variant of TODO:
Contributes to #1277
|
kunalspathak
commented
Jan 6, 2023
Here are few examples of C# and corresponding generated code: https://gist.github.com/kunalspathak/73922d385ea2642192c6167fa4a82778 |
Uh oh!
There was an error while loading. Please reload this page.
…fewer register spilling
kunalspathak
commented
Mar 30, 2023
Done. |
kunalspathak
commented
Mar 31, 2023
/azp runtime-coreclr jitstressregs |
|
Command 'runtime-coreclr' is not supported by Azure Pipelines. Supported commands
See additional documentation. |
kunalspathak
commented
Mar 31, 2023
/azp run runtime-coreclr jitstressregs |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vargaz
commented
Mar 31, 2023
This should fix/improve mono support: |
kunalspathak
commented
Mar 31, 2023
Thanks a lot @vargaz for quick fix. Appreciate it. |
kunalspathak
commented
Mar 31, 2023
Looks like all the |
kunalspathak
commented
Mar 31, 2023
It seems there is a extra Will investigate more. |
This was because we were overwriting the |
kunalspathak
commented
Apr 3, 2023
@BruceForstall - this should be ready to review again. |
BruceForstall
commented
Apr 3, 2023
Interesting range of TP diffs, including improvements for non-arm64 code. |
kunalspathak
commented
Apr 4, 2023
failures are known issues. Thanks @BruceForstall for the review. |

This adds support for remaining variant of
VectorTableLookup()intrinsics that takes tuples fortableparameter. The tuple can have 2, 3 or 4Vector128<byte>values. These APIs has a requirement to allocate consecutive registers for the 1st operand value. This PR adds support for that as well.Details
During importer, depending on the form of 1st argument to the
VectorTableLookup(), create aFIELD_LISTnode with as many fields as number of entries in theValueTupleof that argument. This node is further decomposed into local var.In register allocation, during
buildInterval(), we see this intrinsic and build as manyrefPositionsas number of fields in theValueTuple. We mark each of them with a flagneedsConsecutiveand for the firstrefPosition, we also set number of consecutive registers the entire series need (again, this is same as number of fields ofValueTuplein 1st argument). We also save the series in a newly addednextConsecutiveRefPositionMapmap such that we could go to the next refposition in the series easily. (Note thatRefPositiondoesn't have anextpointer and adding that would have memory cost, hence I chose to add entries in a map).During register assignment, once the "first"
refPositiongets a register, it sets theregisterAssignment(Prior to the allocation pass, registerAssignment captures the valid registers for aRefPosition) of each subsequentRefPositions of the series to the corresponding consecutive register(s) that comes after. Register assignment honors that decision (like it does today) and assigns those registers to the subsequent refpositions of that series.Example:
TODO:
Get theDo not expose the API through ref.ValueTuple<>APIs approvedRnwas assigned and the next refposition should getR0.Contributes to #1277, #81599