diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-15 01:55:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-15 01:55:30 +0000 |
commit | 4d5f508318b2f666ed50a2ed5e49e4aa343a92d6 (patch) | |
tree | ad75d1f1e795fc98c23d34481461d53e17961960 /lib/Transforms/Scalar/IndVarSimplify.cpp | |
parent | 3b19d65897db69f1ce2f91bcd581ab76d1c880cf (diff) |
Eliminate calls to isInteger, generalizing code and tightening checks as needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r-- | lib/Transforms/Scalar/IndVarSimplify.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 5ef886e956..bcd7ed808d 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -325,7 +325,7 @@ void IndVarSimplify::RewriteLoopExitValues(Loop *L) { if (LI->getLoopFor(L->getBlocks()[i]) == L) { // Not in a subloop... BasicBlock *BB = L->getBlocks()[i]; for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E;) { - if (I->getType()->isInteger()) { // Is an integer instruction + if (I->getType()->isIntegral()) { // Is an integer instruction SCEVHandle SH = SE->getSCEV(I); if (SH->hasComputableLoopEvolution(L) || // Varies predictably HasConstantItCount) { @@ -460,7 +460,7 @@ void IndVarSimplify::runOnLoop(Loop *L) { for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) { PHINode *PN = cast<PHINode>(I); - if (PN->getType()->isInteger()) { // FIXME: when we have fast-math, enable! + if (PN->getType()->isIntegral()) { // FIXME: when we have fast-math, enable! SCEVHandle SCEV = SE->getSCEV(PN); if (SCEV->hasComputableLoopEvolution(L)) // FIXME: It is an extremely bad idea to indvar substitute anything more @@ -574,7 +574,7 @@ void IndVarSimplify::runOnLoop(Loop *L) { if (LI->getLoopFor(L->getBlocks()[i]) == L) { // Not in a subloop... BasicBlock *BB = L->getBlocks()[i]; for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) - if (I->getType()->isInteger() && // Is an integer instruction + if (I->getType()->isIntegral() && // Is an integer instruction !I->use_empty() && !Rewriter.isInsertedInstruction(I)) { SCEVHandle SH = SE->getSCEV(I); |