Implement GC.KeepAlive JIT intrinsic#27554
Conversation
|
cc @dotnet/jit-contrib |
Agree.
If I do not mark it as call, |
I'd say yes. Looks like there's precedent there with |
Fixes #27541
5f2a705 to
2166e25
Compare
|
jit-diffs |
Thank you for your help! This works great on x86/x64. On arm, I am getting "Assertion failed '!"Found mismatched live reg var(s) after block". Are the optional regs supposed to work on arm? They seem to be used very rarely on arm. |
|
This is ready to go except the arm specific issue with optional regs. |
They are indeed used very rarely on arm, since there aren't any instructions other than loads that can load a lclVar. So the code that would normally kill a last-use may not kick in if it doesn't get a register. |
|
Indeed, the code that handles a "contained" local read is You could add this logic to the armarch version of |
|
@CarolEidt This did the trick. Thank you! |
|
@dotnet/jit-contrib Could you please take a final look and approve the change? |
Fixes #27541