Support Write-Thru of EH variables in LSRA (#543)
authorCarol Eidt <carol.eidt@microsoft.com>
Wed, 19 Feb 2020 23:52:22 +0000 (15:52 -0800)
committerGitHub <noreply@github.com>
Wed, 19 Feb 2020 23:52:22 +0000 (15:52 -0800)
commit3be5238a376cd4bca32db1acb732dc7c15091cdf
tree324030b24d28be895b47084bf50ac9b7a7ed3001
parent40a5cff8fb1097025aea9d2d112dde9e78fa066b
Support Write-Thru of EH variables in LSRA (#543)

* Support Write-Thru of EH variables in LSRA

Mark EH variables (those that are live in or out of exception regions) only as lvLiveInOutOfHndlr, not necessarily lvDoNotEnregister
During register allocation, mark these as write-thru, and mark all defs as write-thru, ensuring that the stack value is always valid.
Mark those defs with GTF_SPILLED (this the "reload" flag and is not currently used for pure defs) to indicate that it should be kept in the register.
Mark blocks that enter EH regions as having no predecessor, and set the location of all live-in vars to be on the stack.
Change genFnPrologCalleeRegArgs to store EH vars also to the stack if they have a register assignment.

Tuned throughput to compensate for extra processing by rearranging some fields and short-circuiting the physical register RefPositions during allocation.

It is disabled by default
12 files changed:
src/coreclr/src/jit/codegencommon.cpp
src/coreclr/src/jit/codegenlinear.cpp
src/coreclr/src/jit/compiler.cpp
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/gentree.cpp
src/coreclr/src/jit/instr.cpp
src/coreclr/src/jit/jitconfigvalues.h
src/coreclr/src/jit/lclvars.cpp
src/coreclr/src/jit/lsra.cpp
src/coreclr/src/jit/lsra.h
src/coreclr/src/jit/lsrabuild.cpp
src/coreclr/src/jit/treelifeupdater.cpp