Extend the ValuesAtScope cache to cover all expressions, not just
authorDan Gohman <gohman@apple.com>
Mon, 31 Aug 2009 21:15:23 +0000 (21:15 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 31 Aug 2009 21:15:23 +0000 (21:15 +0000)
commit42214899082bfb5b6f8c6a09d355fec9ef4a0e82
tree9787b4979b555cb718f5c2a82fa5209a69d8fa63
parentb97cb9cbe120c50cd78c4d2c0b86d4dd8047b055
Extend the ValuesAtScope cache to cover all expressions, not just
SCEVUnknowns, as the non-SCEVUnknown cases in the getSCEVAtScope code
can also end up repeatedly climing through the same expression trees,
which can be unusably slow when the trees are very tall.

Also, add a quick check for SCEV pointer equality to the main
SCEV comparison routine, as the full comparison code can be expensive
in the case of large expression trees.

These fix compile-time problems in some pathlogical cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80623 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp