JIT: fix overly aggressive tail recursive call loop marking (#33517)
authorAndy Ayers <andya@microsoft.com>
Thu, 12 Mar 2020 22:49:40 +0000 (15:49 -0700)
committerGitHub <noreply@github.com>
Thu, 12 Mar 2020 22:49:40 +0000 (15:49 -0700)
commit84cf6a19356d7574664ce08251815ddd4e3d2964
treef4a187535b7c69fba6e17a48ac8391a4e2b80d35
parent57dd449dae72859b156923e995162950ade5dc23
JIT: fix overly aggressive tail recursive call loop marking (#33517)

If there is a tail recursive call site, the jit will mark all blocks
from method entry to the block with the call as "in a loop," anticipating
a tail recursive call to loop optimization.

Because of some confusing naming we were doing this even for recursive calls
that were not tail calls. Upshot is that blocks were marked as being in loops
when they weren't, and (among other things) this made the inliner more
aggressive for calls in those blocks.
src/coreclr/src/jit/importer.cpp