JIT: don't compute edge weights if not optimizing (dotnet/coreclr#19736)
authorAndy Ayers <andya@microsoft.com>
Thu, 30 Aug 2018 15:01:46 +0000 (08:01 -0700)
committerGitHub <noreply@github.com>
Thu, 30 Aug 2018 15:01:46 +0000 (08:01 -0700)
commit3f46b3143790cf362e643d2dbc01c0f0f99e6092
tree5a3f37775b61d0162386be4808e56cc2c642bd37
parent08c5d11aeae4f3ae9e697b9f45b33953fb4f6af7
JIT: don't compute edge weights if not optimizing (dotnet/coreclr#19736)

We were spending a bit less than 1% of jit time computing edge weights
for minopts an debug codegen, but then never using them.

Also when optimizing we wanted to just compute edge weights but ran
through a bit more code than that.

Restructure the code so it's clearer what runs when, and bypass the
edge weight computations for minopts and debug codegen.

Commit migrated from https://github.com/dotnet/coreclr/commit/d43347e043beb3ae64c8db55f72708c1ce60511e
src/coreclr/src/jit/compiler.cpp
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/flowgraph.cpp