diff options
author | Duncan Sands <baldrick@free.fr> | 2010-02-16 11:11:14 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-02-16 11:11:14 +0000 |
commit | 19d0b47b1f58f913f9d39f0e2b0eb470f04ba82f (patch) | |
tree | d692f99bcaf8ceb28f12c941b517898ee7faedd3 /llvm/lib/Analysis/ScalarEvolutionExpander.cpp | |
parent | d7d8afabd0498537b27b667151770b6b56691966 (diff) | |
download | bcm5719-llvm-19d0b47b1f58f913f9d39f0e2b0eb470f04ba82f.tar.gz bcm5719-llvm-19d0b47b1f58f913f9d39f0e2b0eb470f04ba82f.zip |
There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolutionExpander.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp index c2e1f8902f8..ccd6d6b2778 100644 --- a/llvm/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Analysis/ScalarEvolutionExpander.cpp @@ -536,7 +536,7 @@ Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) { // pointer type, if there is one, or the last operand otherwise. int PIdx = 0; for (; PIdx != NumOperands - 1; ++PIdx) - if (isa<PointerType>(S->getOperand(PIdx)->getType())) break; + if (S->getOperand(PIdx)->getType()->isPointerTy()) break; // Expand code for the operand that we chose. Value *V = expand(S->getOperand(PIdx)); @@ -702,7 +702,7 @@ SCEVExpander::getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized, // negative, insert a sub instead of an add for the increment (unless it's a // constant, because subtracts of constants are canonicalized to adds). const SCEV *Step = Normalized->getStepRecurrence(SE); - bool isPointer = isa<PointerType>(ExpandTy); + bool isPointer = ExpandTy->isPointerTy(); bool isNegative = !isPointer && isNonConstantNegative(Step); if (isNegative) Step = SE.getNegativeSCEV(Step); @@ -852,7 +852,7 @@ Value *SCEVExpander::visitAddRecExpr(const SCEVAddRecExpr *S) { PHINode *CanonicalIV = 0; if (PHINode *PN = L->getCanonicalInductionVariable()) if (SE.isSCEVable(PN->getType()) && - isa<IntegerType>(SE.getEffectiveSCEVType(PN->getType())) && + SE.getEffectiveSCEVType(PN->getType())->isIntegerTy() && SE.getTypeSizeInBits(PN->getType()) >= SE.getTypeSizeInBits(Ty)) CanonicalIV = PN; |