Avoid creating canonical induction variables for non-native types.

For example, on 32-bit architecture, don't promote all uses of the IV
to 64-bits just because one use is a 64-bit cast.
Alternate implementation of the patch by Arnaud de Grandmaison.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127884 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick
2011-03-18 16:50:32 +00:00
parent 84161c2f68
commit 5fd5b125ff
20 changed files with 30 additions and 19 deletions

View File

@@ -28,6 +28,7 @@ class IVUsers;
class ScalarEvolution;
class SCEV;
class IVUsers;
class TargetData;
/// IVStrideUse - Keep track of one use of a strided induction variable.
/// The Expr member keeps track of the expression, User is the actual user
@@ -122,6 +123,7 @@ class IVUsers : public LoopPass {
LoopInfo *LI;
DominatorTree *DT;
ScalarEvolution *SE;
TargetData *TD;
SmallPtrSet<Instruction*,16> Processed;
/// IVUses - A list of all tracked IV uses of induction variable expressions