]> granicus.if.org Git - llvm/commit
[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)
commit0f49a66c4228539049f62a36b55f4350b9d21a6c
tree98b8f2f31eee5871648b0a770e6bee213e6b0be4
parent84468c22d8e93ce8cf72ef5cbac66c3179ca5e42
[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.

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