[SCEV] Cap the number of instructions scanned when infering flags
authorPhilip Reames <listmail@philipreames.com>
Sun, 3 Oct 2021 23:14:06 +0000 (16:14 -0700)
committerPhilip Reames <listmail@philipreames.com>
Sun, 3 Oct 2021 23:14:06 +0000 (16:14 -0700)
commit5f7a5353301b776ffb0e5fb048992898507bf7ee
tree3a489e91a6bc2a4cd2c345fb9732548fa8b1faac
parent35ab211c37534fda0288acda510ee5bc6b85f96a
[SCEV] Cap the number of instructions scanned when infering flags

This addresses a comment from review on D109845.  The concern was raised that an unbounded scan would be expensive.  Long term plan is to cache this search - likely reusing the existing mechanism for loop side effects - but let's be simple and conservative for now.
llvm/lib/Analysis/ScalarEvolution.cpp