OSDN Git Service

Extend ScalarEvolution's getBackedgeTakenCount to be able to
authorDan Gohman <gohman@apple.com>
Thu, 30 Apr 2009 20:47:05 +0000 (20:47 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 30 Apr 2009 20:47:05 +0000 (20:47 +0000)
commita1af757e0af9c2fb5ade4b06408e1adfa0425c6c
tree8da340fbd59d069ffe055b4a2e6803323fc283c2
parent0490dcb1b73f2668ad12b7f45962500aaa3fc471
Extend ScalarEvolution's getBackedgeTakenCount to be able to
compute an upper-bound value for the trip count, in addition to
the actual trip count. Use this to allow getZeroExtendExpr and
getSignExtendExpr to fold casts in more cases.

This may eventually morph into a more general value-range
analysis capability; there are certainly plenty of places where
more complete value-range information would allow more folding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70509 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/2008-11-18-Stride1.ll
test/Analysis/ScalarEvolution/max-trip-count.ll [new file with mode: 0644]
test/Analysis/ScalarEvolution/trip-count3.ll [new file with mode: 0644]