[SCEV] Look at backedge dominating conditions (re-land r233447).
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 1 Apr 2015 18:24:06 +0000 (18:24 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 1 Apr 2015 18:24:06 +0000 (18:24 +0000)
commit5436372079c2ab1614e564bcec74383da62701a2
treef7a206349eff3a47278cd1ce8e750d5c63162bd4
parent32d9020423f9b49c831bce1244218b575819029c
[SCEV] Look at backedge dominating conditions (re-land r233447).

Summary:
This change teaches ScalarEvolution::isLoopBackedgeGuardedByCond to look
at edges within the loop body that dominate the latch.  We don't do an
exhaustive search for all possible edges, but only a quick walk up the
dom tree.

This re-lands r233447.  r233447 was reverted because it caused massive
compile-time regressions.  This change has a fix for the same issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233829 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/latch-dominating-conditions.ll [new file with mode: 0644]