Do not set GLOB_REF for invariant indirections (#65709)
authorSingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Tue, 22 Feb 2022 15:37:25 +0000 (18:37 +0300)
committerGitHub <noreply@github.com>
Tue, 22 Feb 2022 15:37:25 +0000 (16:37 +0100)
commit4ff711f33652d423b3f3d2472674951407e4130d
tree2526f45b9ab2e621cd410d7918d682d4ce3b4045
parent3079505a45cce88b9a4d9ef55b50c9944c5c412c
Do not set GLOB_REF for invariant indirections (#65709)

The GTF_GLOB_REF flag in the compiler has the meaning that
the node marked with it produces a value that could be modified
by a call or an indirect store. It is used for optimizations
that need to know whether it is safe to reorder two trees.

Invariant indirections, by definition, always produce the
same value, and as such do not need to be marked with GLOB_REF.

Some nice diffs from args sorting: string literals can now
be put in the "late args" list directly (without a temp).
src/coreclr/jit/gentree.cpp