Make LoopSimplify change conditional branches in loop exiting blocks
authorDan Gohman <gohman@apple.com>
Thu, 25 Feb 2010 06:57:05 +0000 (06:57 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 25 Feb 2010 06:57:05 +0000 (06:57 +0000)
commit85669637139089eaed8def1583ac04266c9654e2
tree9179b71a2387b88fd18bfb147114734c0c7d0ccc
parenta5028a64634f995630e93390c5c23374a09a450f
Make LoopSimplify change conditional branches in loop exiting blocks
which branch on undef to branch on a boolean constant for the edge
exiting the loop. This helps ScalarEvolution compute trip counts for
loops.

Teach ScalarEvolution to recognize single-value PHIs, when safe, and
ForgetSymbolicName to forget such single-value PHI nodes as apprpriate
in ForgetSymbolicName.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97126 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Utils/LoopSimplify.cpp
test/CodeGen/X86/2009-09-07-CoalescerBug.ll
test/Transforms/IndVarSimplify/2003-09-12-MultiplePred.ll
test/Transforms/LoopDeletion/simplify-then-delete.ll [new file with mode: 0644]