JIT bails on for some multi-dimensional array expansions
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
On targets without JIT this causes fallback to interpreter since crossgen2 does not support precompiling md array intrinsics. We can solve that by guaranteeing the expansion for all cases.
Currently we have 3 separate bailouts in `impArrayAccessIntrinsic`:
1. Rank <= 1
1. Rank > 3
1. `Set`/`Address` requiring a runtime type check
We should consider addressing 2 and 3.
Contributor guide
Research direction
Start with the JIT entry point `impArrayAccessIntrinsic` and trace its three bailout conditions, especially rank greater than 3 and `Set`/`Address` operations requiring a runtime type check. Read how crossgen2 handles multi-dimensional array intrinsics and verify that the relevant cases expand instead of falling back to the interpreter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- compilers, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100