Rerun reg predict on ARM if codegen temps increase the frame size.
authorPat Gavlin <pagavlin@microsoft.com>
Thu, 27 Jul 2017 22:48:48 +0000 (15:48 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Thu, 27 Jul 2017 22:48:48 +0000 (15:48 -0700)
commit34ab664ed4ba6ae24e283ca18d1ea53ae4be8421
tree3d81ed8f74bdddf158013cf4f2b61680f8ae41f4
parentfc2f62a10d7216352d8c671006e8239fd487b421
Rerun reg predict on ARM if codegen temps increase the frame size.

When compiling for ARM, we need to reserve an additional register if the
frame size exceeds a particular watermark. We currently evaluate whether
or not we need to reserve this register in two places: first before
register prediction and then again during register prediction but after
allocating registers for lclVars. The latter evalutation is used to
check whether or not we can remove the register reservation if the frame
size shrinks due to lclVar register allocation. Unfortunately, its
frame size estimate does not include codegen temps, so we can end up
undoing the register reservation in a frame that requires the reserved
register once the number of temps is estimated.

This change adds an additional check to the register predictor after
temp estimation has occurred and reruns prediction if the frame size has
increased and now requires a register reservation that it did not
beforehand.

Fixes VSO 469217.
src/jit/lclvars.cpp
src/jit/regalloc.cpp