Reapply r287232 from upstream llvm trunk (by Daniil Fukalov):
authordim <dim@FreeBSD.org>
Mon, 6 Mar 2017 21:14:20 +0000 (21:14 +0000)
committerdim <dim@FreeBSD.org>
Mon, 6 Mar 2017 21:14:20 +0000 (21:14 +0000)
commiteefaaf9172ac36e321ed5706d4e707055e68f0b5
tree74858e5412a4d4866bd53fb7779a38f11571b961
parent4181033340b5e9b6788de35b0cf5b5321551ee44
Reapply r287232 from upstream llvm trunk (by Daniil Fukalov):

  [SCEV] limit recursion depth of CompareSCEVComplexity

  Summary:
  CompareSCEVComplexity goes too deep (50+ on a quite a big unrolled
  loop) and runs almost infinite time.

  Added cache of "equal" SCEV pairs to earlier cutoff of further
  estimation. Recursion depth limit was also introduced as a parameter.

  Reviewers: sanjoy

  Subscribers: mzolotukhin, tstellarAMD, llvm-commits

  Differential Revision: https://reviews.llvm.org/D26389

Pull in r296992 from upstream llvm trunk (by Sanjoy Das):

  [SCEV] Decrease the recursion threshold for CompareValueComplexity

  Fixes PR32142.

  r287232 accidentally increased the recursion threshold for
  CompareValueComplexity from 2 to 32.  This change reverses that
  change by introducing a separate flag for CompareValueComplexity's
  threshold.

The latter revision fixes the excessive compile times for skein_block.c.
contrib/llvm/lib/Analysis/ScalarEvolution.cpp