[SCEV] Add missing cache queries
authorEhud Katz <ehudkatz@gmail.com>
Fri, 13 Mar 2020 13:32:43 +0000 (15:32 +0200)
committerEhud Katz <ehudkatz@gmail.com>
Fri, 13 Mar 2020 13:32:43 +0000 (15:32 +0200)
commitfcc2238b8bfb9498b46a48d219193de8c00a25a0
tree4d63a7794f3c5470abf12659d3c78d5d1babb4f8
parenta0c15ed46056a5c8bc6f86d6d636b6375354efc6
[SCEV] Add missing cache queries

Calculating SCEVs can be cumbersome, and may take very long time (even
hours, for very long expressions). To prevent recalculating expressions
over and over again, we cache them.
This change add cache queries to key positions, to prevent recalculation
of the expressions.

Fix PR43571.

Differential Revision: https://reviews.llvm.org/D70097
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/lib/Analysis/ScalarEvolution.cpp