[SCEV] Use depth limit for trunc analysis

Summary:
This fixes an extremely long compile time caused by recursive analysis
of truncs, which were not previously subject to any depth limits unlike
some of the other ops. I decided to use the same control used for
sext/zext, since the routines analyzing these are sometimes mutually
recursive with the trunc analysis.

Reviewers: mkazantsev, sanjoy

Subscribers: sanjoy, jdoerfert, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355949 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed