diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-12-03 22:26:30 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-12-03 22:26:30 +0000 |
| commit | 3462ae3ad7944394d0e9b82be222a43a26ca289a (patch) | |
| tree | f9ecc5677deccb6e178948795e6e268023d98a0c /llvm/lib/Transforms/Scalar/InductionVars.cpp | |
| parent | bca18d7d96fd6d0df98019074e144f5b270d222c (diff) | |
| download | bcm5719-llvm-3462ae3ad7944394d0e9b82be222a43a26ca289a.tar.gz bcm5719-llvm-3462ae3ad7944394d0e9b82be222a43a26ca289a.zip | |
Rename ConstPoolVal -> Constant
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InductionVars.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InductionVars.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/Scalar/InductionVars.cpp b/llvm/lib/Transforms/Scalar/InductionVars.cpp index 7dfae486d2b..d4b7bc50104 100644 --- a/llvm/lib/Transforms/Scalar/InductionVars.cpp +++ b/llvm/lib/Transforms/Scalar/InductionVars.cpp @@ -20,7 +20,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Optimizations/InductionVars.h" -#include "llvm/ConstPoolVals.h" +#include "llvm/ConstantVals.h" #include "llvm/Analysis/IntervalPartition.h" #include "llvm/Assembly/Writer.h" #include "llvm/SymbolTable.h" @@ -36,7 +36,7 @@ using namespace opt; // an interval invariant computation. // static bool isLoopInvariant(cfg::Interval *Int, Value *V) { - assert(isa<ConstPoolVal>(V) || isa<Instruction>(V) || isa<MethodArgument>(V)); + assert(isa<Constant>(V) || isa<Instruction>(V) || isa<MethodArgument>(V)); if (!isa<Instruction>(V)) return true; // Constants and arguments are always loop invariant @@ -132,12 +132,12 @@ static inline bool isLinearInductionVariable(cfg::Interval *Int, Value *V, static inline bool isSimpleInductionVar(PHINode *PN) { assert(PN->getNumIncomingValues() == 2 && "Must have cannonical PHI node!"); Value *Initializer = PN->getIncomingValue(0); - if (!isa<ConstPoolVal>(Initializer)) return false; + if (!isa<Constant>(Initializer)) return false; if (Initializer->getType()->isSigned()) { // Signed constant value... - if (((ConstPoolSInt*)Initializer)->getValue() != 0) return false; + if (((ConstantSInt*)Initializer)->getValue() != 0) return false; } else if (Initializer->getType()->isUnsigned()) { // Unsigned constant value - if (((ConstPoolUInt*)Initializer)->getValue() != 0) return false; + if (((ConstantUInt*)Initializer)->getValue() != 0) return false; } else { return false; // Not signed or unsigned? Must be FP type or something } @@ -153,12 +153,12 @@ static inline bool isSimpleInductionVar(PHINode *PN) { // Get the right hand side of the ADD node. See if it is a constant 1. Value *StepSize = I->getOperand(1); - if (!isa<ConstPoolVal>(StepSize)) return false; + if (!isa<Constant>(StepSize)) return false; if (StepSize->getType()->isSigned()) { // Signed constant value... - if (((ConstPoolSInt*)StepSize)->getValue() != 1) return false; + if (((ConstantSInt*)StepSize)->getValue() != 1) return false; } else if (StepSize->getType()->isUnsigned()) { // Unsigned constant value - if (((ConstPoolUInt*)StepSize)->getValue() != 1) return false; + if (((ConstantUInt*)StepSize)->getValue() != 1) return false; } else { return false; // Not signed or unsigned? Must be FP type or something } @@ -189,8 +189,8 @@ static PHINode *InjectSimpleInductionVariable(cfg::Interval *Int) { // Create the neccesary instructions... PHINode *PN = new PHINode(Type::UIntTy, PHIName); - ConstPoolVal *One = ConstPoolUInt::get(Type::UIntTy, 1); - ConstPoolVal *Zero = ConstPoolUInt::get(Type::UIntTy, 0); + Constant *One = ConstantUInt::get(Type::UIntTy, 1); + Constant *Zero = ConstantUInt::get(Type::UIntTy, 0); BinaryOperator *AddNode = BinaryOperator::create(Instruction::Add, PN, One, AddName); |

