Skip to content

JIT: it is difficult to do flow analysis on inlinees #82755

Closed
@AndyAyersMS

Description

@AndyAyersMS

Inlinee compilers allocate their blocks in the root compiler's flow graph pool, and use the root compiler's block numbering.

Because of this, running analysis on the inlinee compiler's flowgraph "fragment" proves tricky. We got a taste of this in #80958, where I had to introduce fgBBNumMin, whose value is only 1 for the root compiler.

For example, to use a BlockSet one must either use the root compiler's epoch (in which case the bit vectors and scratch storage based on fgBBNumMax are much too large) or else remember to consistently things downward (like bbID) by fgBBNumMin.

This impacts a lot of flow utility methods that might be useful to run on inlinee flowgraph fragments, eg fgDfsReversePostorder (see #82752).

It would be helpful to come up with a better model so that code can be written "naturally" but properly handle cases where it's invoked on inlinee graphs.

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions