Loop refactoring and commenting improvements (#61496)
authorBruce Forstall <brucefo@microsoft.com>
Mon, 15 Nov 2021 21:25:51 +0000 (13:25 -0800)
committerGitHub <noreply@github.com>
Mon, 15 Nov 2021 21:25:51 +0000 (13:25 -0800)
commitfb6cf5cc8b045360f01fc2826d8fd5c342c26d5f
treec605b3d5ffedca6016e3aa59ba00bddd1860ecf5
parentf3228da4cac07539ba390cd1861380f88c0cd97f
Loop refactoring and commenting improvements (#61496)

- Remove unneeded FIRST concept in loop table; it was always equal to TOP.
- Rename optMarkLoopsBlocks to optScaleLoopBlocks to more accurately describe
what it does. More consistently report block scaling in the dump
- Create optMarkLoopHeads. This was refactored out of fgRemoveUnreachableBlocks so
it can be called in a more logical location (at the beginning of optFindLoops),
and only does one thing.
- fgMakeOutgoingStructArgCopy: remove unused `argIndex` argument; reorder calls to
fgMightHaveLoop.
- Update and write a bunch of comments; convert away from `/* */` style comments.
12 files changed:
src/coreclr/jit/compiler.cpp
src/coreclr/jit/compiler.h
src/coreclr/jit/compiler.hpp
src/coreclr/jit/fgbasic.cpp
src/coreclr/jit/fgdiagnostic.cpp
src/coreclr/jit/fgopt.cpp
src/coreclr/jit/fgprofile.cpp
src/coreclr/jit/flowgraph.cpp
src/coreclr/jit/loopcloning.cpp
src/coreclr/jit/lsra.cpp
src/coreclr/jit/morph.cpp
src/coreclr/jit/optimizer.cpp