Open pgavlin opened 7 years ago
cc @AndyAyersMS @dotnet/jit-contrib
I wonder if we should take this even further and just use helper calls for array loads and stores in debuggable and perhaps in Tier0 codegen. This would factor out the null check, bounds check, exception throw and address calculations and should further reduce the JIT's IR volume.
Likely we'd need to fix the diagnostic aspect so the exceptions look like they were thrown by the caller, but I assume we must have suitable magic for this already... eg the store covariance check does these exception checks.
That's an interesting idea... I can't recall offhand whether or not there were any gotchas beyond the optimizer changes that would make implementing such a change especially difficult. My intuition says it should be relatively straightforward, though.
Consider for 2.1
Looking like this is not going to make the cut for 2.1. So will move it out to Future.
This expansion of
GT_INDEX
was recently introduced and enabled for minopts, but is suitable for other throughput-favored scenarios as well.Using this expansion for debuggable code involves a bit of work in the optimizer to handle the new IR.
category:throughput theme:ir skill-level:expert cost:small