Tolerate pathological growth of optCSEHash (#40056)
authorDavid Wrighton <davidwr@microsoft.com>
Wed, 29 Jul 2020 20:26:34 +0000 (13:26 -0700)
committerGitHub <noreply@github.com>
Wed, 29 Jul 2020 20:26:34 +0000 (13:26 -0700)
commit50d412de361f0ea815b2245c682a414503587821
tree1f5147a60a927cd9b290a6401c47a26cb13ef3e5
parenta4bd2fb7dfe5d66e0151c86678b4bbf149794772
Tolerate pathological growth of optCSEHash (#40056)

The optCSEhash can grow an unbounded amount if the function has numerous trees which are put into the optCSEhash as possible CSE candidates, but fewer than MAX_CSE_CNT are found, then the compiler will spend excessive amounts of time looking up entries in the optCSEhash.

This fix addresses the issue by making the optCSEhash able to grow its count of buckets.
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/optcse.cpp