JIT: build pred lists when we first build the flow graph (#81524)
authorAndy Ayers <andya@microsoft.com>
Thu, 2 Feb 2023 20:11:01 +0000 (12:11 -0800)
committerGitHub <noreply@github.com>
Thu, 2 Feb 2023 20:11:01 +0000 (12:11 -0800)
commitd17148d897bf0da8fa57f7873364207e87592b54
treefe6e18e2b357543c973758f3f4889e8287d96181
parentb0515b59487be6e06254d0c670ce76035fc19fc8
JIT: build pred lists when we first build the flow graph (#81524)

This is the last in a (long) series. We now build the pred lists at the same
time we are initially connecting up the flow graph. Pred lists are now always
valid and need to be maintained by all phases.

There are some changes needed in EH normalization, and one special case we
need to handle in debug codegen where we create the scratch BB very early on.
This was the last client for the cheap pred lists.

Note some of the pred list info can't be added right away, in particular
the "return" edges from finallies do not appear until we've made it through
the importer.

I have deferred cleaning up dead code; will do it in follow-up changes.

Contributes to #80193.
src/coreclr/jit/compiler.cpp
src/coreclr/jit/fgbasic.cpp
src/coreclr/jit/jiteh.cpp