summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LowerGC.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-10-20 07:07:24 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-10-20 07:07:24 +0000
commite0fc4dfc2275a2c36583e5800854e64d5f5e3255 (patch)
tree6a3d057b6742055ed3a3592e58421a7b41b42f1e /llvm/lib/Transforms/Scalar/LowerGC.cpp
parent5d417e35bc36094f2e6519866fd25f4d0db6c551 (diff)
downloadbcm5719-llvm-e0fc4dfc2275a2c36583e5800854e64d5f5e3255.tar.gz
bcm5719-llvm-e0fc4dfc2275a2c36583e5800854e64d5f5e3255.zip
For PR950:
This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. llvm-svn: 31063
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LowerGC.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LowerGC.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/LowerGC.cpp b/llvm/lib/Transforms/Scalar/LowerGC.cpp
index 851009c7d6f..6a07691adb9 100644
--- a/llvm/lib/Transforms/Scalar/LowerGC.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerGC.cpp
@@ -222,8 +222,8 @@ bool LowerGC::runOnFunction(Function &F) {
BasicBlock::iterator IP = AI;
while (isa<AllocaInst>(IP)) ++IP;
- Constant *Zero = ConstantUInt::get(Type::UIntTy, 0);
- Constant *One = ConstantUInt::get(Type::UIntTy, 1);
+ Constant *Zero = ConstantInt::get(Type::UIntTy, 0);
+ Constant *One = ConstantInt::get(Type::UIntTy, 1);
// Get a pointer to the prev pointer.
std::vector<Value*> Par;
@@ -237,11 +237,11 @@ bool LowerGC::runOnFunction(Function &F) {
new StoreInst(PrevPtr, PrevPtrPtr, IP);
// Set the number of elements in this record.
- Par[1] = ConstantUInt::get(Type::UIntTy, 1);
+ Par[1] = ConstantInt::get(Type::UIntTy, 1);
Value *NumEltsPtr = new GetElementPtrInst(AI, Par, "numeltsptr", IP);
- new StoreInst(ConstantUInt::get(Type::UIntTy, GCRoots.size()), NumEltsPtr,IP);
+ new StoreInst(ConstantInt::get(Type::UIntTy, GCRoots.size()), NumEltsPtr,IP);
- Par[1] = ConstantUInt::get(Type::UIntTy, 2);
+ Par[1] = ConstantInt::get(Type::UIntTy, 2);
Par.resize(4);
const PointerType *PtrLocTy =
@@ -251,7 +251,7 @@ bool LowerGC::runOnFunction(Function &F) {
// Initialize all of the gcroot records now, and eliminate them as we go.
for (unsigned i = 0, e = GCRoots.size(); i != e; ++i) {
// Initialize the meta-data pointer.
- Par[2] = ConstantUInt::get(Type::UIntTy, i);
+ Par[2] = ConstantInt::get(Type::UIntTy, i);
Par[3] = One;
Value *MetaDataPtr = new GetElementPtrInst(AI, Par, "MetaDataPtr", IP);
assert(isa<Constant>(GCRoots[i]->getOperand(2)) && "Must be a constant");
OpenPOWER on IntegriCloud