JIT: some small profile related fixes (#43408)
authorAndy Ayers <andya@microsoft.com>
Fri, 16 Oct 2020 18:33:33 +0000 (11:33 -0700)
committerGitHub <noreply@github.com>
Fri, 16 Oct 2020 18:33:33 +0000 (11:33 -0700)
commit7601d44ca06fc977c4a3c7a33c1fc864f8f5ad78
tree6403931d53278950787f27695d450cc16c5d6e6d
parent8c48ae89ef229c293d233f0e30d755df81d564e5
JIT: some small profile related fixes (#43408)

1. If we're inheriting a fraction of the profile weight of a profiled block,
mark the inheriting block as profiled. This prevents methods like
`optSetBlockWeights` or `optMarkLoopBlocks` from coming along later and setting
the weights to something else. Since the full inheritance method has similar
logic, make it delegate to the fractional one, with a scale of 100 (no scaling).

2. If we switch from Tier0 to FullOpt, make sure to clear the BBINSTR flag,
else we'll put probes into optimized code.

3. Dump edge weights in the dot graph, if we have them.

4. Only dump the flow graph twice per phase.
src/coreclr/src/jit/block.h
src/coreclr/src/jit/compiler.cpp
src/coreclr/src/jit/flowgraph.cpp