Improve fgAddRefPred (#12585)
authorBruce Forstall <brucefo@microsoft.com>
Sat, 1 Jul 2017 06:04:14 +0000 (23:04 -0700)
committerGitHub <noreply@github.com>
Sat, 1 Jul 2017 06:04:14 +0000 (23:04 -0700)
commit58d0ead6d34837fab60da1473090588db415fc1d
tree1f57e8fe28b4426bfff1b0b0447aefaa6b5b9f93
parentbfc3141f97a9f9f0d095f3d2e99a7c02ce869ab0
Improve fgAddRefPred (#12585)

* Improve fgAddRefPred

Only do one search through the predecessor list looking for an
existing predecessor edge, or looking for the proper location to
insert a new predecessor edge. Previously, we traversed the list
twice (or part of twice) for new edges. For new edges, stop the
search when we reach the correct location in sorted order.

This reduces x86 release minopts instruction count by 0.42% and
full opts instruction count by 0.33% (of a superpmi replay of
the tests).

Fixes #12582

* Update for feedback
src/jit/flowgraph.cpp