Generalize IVUsers to track arbitrary expressions rather than expressions
authorDan Gohman <gohman@apple.com>
Wed, 7 Apr 2010 22:27:08 +0000 (22:27 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 7 Apr 2010 22:27:08 +0000 (22:27 +0000)
commit448db1cdef5872713ef77beffacf502ae3450cd7
treed8df55b2c06d8bebee028100f60d2126d376790d
parentb72e59e3615c4f8a8ac272629511814000cde5e0
Generalize IVUsers to track arbitrary expressions rather than expressions
explicitly split into stride-and-offset pairs. Also, add the
ability to track multiple post-increment loops on the same expression.

This refines the concept of "normalizing" SCEV expressions used for
to post-increment uses, and introduces a dedicated utility routine for
normalizing and denormalizing expressions.

This fixes the expansion of expressions which are post-increment users
of more than one loop at a time. More broadly, this takes LSR another
step closer to being able to reason about more than one loop at a time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100699 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/IVUsers.h
include/llvm/Analysis/ScalarEvolutionExpander.h
include/llvm/Analysis/ScalarEvolutionNormalization.h [new file with mode: 0644]
lib/Analysis/IVUsers.cpp
lib/Analysis/ScalarEvolutionExpander.cpp
lib/Analysis/ScalarEvolutionNormalization.cpp [new file with mode: 0644]
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/CodeGen/X86/multiple-loop-post-inc.ll [new file with mode: 0644]
test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll