OSDN Git Service

Fix the threshold added in r186434 (a re-apply of r185393) and updaated
authorChandler Carruth <chandlerc@gmail.com>
Thu, 2 Oct 2014 22:23:14 +0000 (22:23 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 2 Oct 2014 22:23:14 +0000 (22:23 +0000)
commitbbb28e7e98250e4fa218587633c700ee009e261f
tree86a37025845e040366bc977031c76e0493ee8a66
parentb3f91b0af71d53114eae92424c00e5f26567c017
Fix the threshold added in r186434 (a re-apply of r185393) and updaated
to be a ManagedStatic in r218163 to not be a global variable written and
read to from within the innards of SpillPlacement.

This will fix a really scary race condition for anyone that has two
copies of LLVM running spill placement concurrently. Yikes!

This will also fix a really significant compile time hit that r218163
caused because the spill placement threshold read is actually in the
*very* hot path of this code. The memory fence on each read was showing
up as huge compile time regressions when spilling is responsible for
most of the compile time. For example, optimizing sanitized code showed
over 50% compile time regressions here. =/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218921 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SpillPlacement.cpp
lib/CodeGen/SpillPlacement.h