[mono][llvm] Avoid making volatile loads/stores to variables marked INDIRECT. (#84674)
authorZoltan Varga <vargaz@gmail.com>
Wed, 12 Apr 2023 14:55:27 +0000 (10:55 -0400)
committerGitHub <noreply@github.com>
Wed, 12 Apr 2023 14:55:27 +0000 (10:55 -0400)
commitc31d2641271f66bf1ba338bb9f1d3c478b9449ba
treefd3c8179f734da48d15a2c01053cdecd771aa861
parent7a0c3a392bcaadba66ece6e34c211f701051ac3f
[mono][llvm] Avoid making volatile loads/stores to variables marked INDIRECT. (#84674)

Variables in the JIT are marked INDIRECT when their address is taken.
Using volatile loads/stores prevents LLVM from optimizing away the
address taking.

Re: https://github.com/dotnet/perf-autofiling-issues/issues/15699.
src/mono/mono/mini/mini-llvm.c