[SCEV] Move towards a verifier without false positives
authorSanjoy Das <sanjoy@playingwithpointers.com>
Sun, 23 Apr 2017 23:04:45 +0000 (23:04 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Sun, 23 Apr 2017 23:04:45 +0000 (23:04 +0000)
commit148e49f3c8cf34289320fb5f20b917ffa96cfb6a
treeebc1a54f260f0da0426da397a23b045c4e8ee3de
parent12df01c3c72300f2c3390b396da191198ee4704c
[SCEV] Move towards a verifier without false positives

This change reboots SCEV's current (off by default) verification logic
to avoid false failures.  Instead of stringifying trip counts, it maps
old and new trip counts to the same ScalarEvolution "universe" and
asks ScalarEvolution to compute the difference between them.  If the
difference comes out to be a non-zero constant, then (barring some
corner cases) we *know* we messed up.

I've not yet enabled this by default since it hits an exponential time
issue in SCEV, but once I fix that, I'll flip it on by default in
EXPENSIVE_CHECKS builds.

llvm-svn: 301146
llvm/lib/Analysis/ScalarEvolution.cpp