JIT: fix issue with inline observations (#15713)
authorAndy Ayers <andya@microsoft.com>
Sat, 6 Jan 2018 00:41:02 +0000 (16:41 -0800)
committerGitHub <noreply@github.com>
Sat, 6 Jan 2018 00:41:02 +0000 (16:41 -0800)
commita46475cdacca8beeb02193c2298f1df62328a317
tree43bdf05c96245c74ccbb1d914b0ef1cb7c2672f8
parenta91d3fd660568a53a9395ef5d0eeaf869e56606a
JIT: fix issue with inline observations (#15713)

In DEBUG/CHECK builds the jit tries to keep track of failed inlines.

Because inlines can be rejected "early" (when the parent method
is being imported) as well as "late" (when their call site is encountered
by the inliner) there is a tracking mechanism to convey the early observations
that cause failures to be resurrected later on.

These observations sometimes didn't end up in the inline context, leading
to assertions when dumping methods.

Fix is to add a new way to propagate the earlier observation to the context
that bypasses some of the policy sanity checks and simply record the reason
that the inline failed.
src/jit/flowgraph.cpp
src/jit/inline.cpp
src/jit/inline.h
src/jit/inlinepolicy.cpp
src/jit/inlinepolicy.h