Inliner: fix assert about repeated failing observations
authorAndy Ayers <andya@microsoft.com>
Tue, 8 Mar 2016 18:35:30 +0000 (10:35 -0800)
committerAndy Ayers <andya@microsoft.com>
Tue, 8 Mar 2016 18:49:40 +0000 (10:49 -0800)
commitbf443617c47fc03aad093d696b221da806239fe5
tree03baeaf875c68c9ccd07d7b734fa569d8a7633d5
parent56c43a5b229c375b5e11eba25dc0ab5997f23256
Inliner: fix assert about repeated failing observations

When an inlining attempt is going to fail, the jit aims to bail out of
the attempt as quickly as possible, since any further work on this
inline will just waste time and memory. The jit monitors this in part
by asserting that it only makes one failing observation.

However, there are as few places where failing fast during inlining is
not currently possible, and repeated failing observations may occur.

This change loosens the assertion check to allow repeated
`CALLSITE_TOO_MANY_LOCALS` observations. This observation is made
at a fairly deep stack in `lvaGrabTemp` with no easy route to bail
out in case of imminent failure.

Closes #3586.
src/jit/inlinepolicy.cpp