summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-01-20 10:49:23 +0000
committerDuncan Sands <baldrick@free.fr>2008-01-20 10:49:23 +0000
commitfe3bef091f4322602ed5a8da432dc10910096b45 (patch)
tree55d9492b8f39af3400207c92abfab5bf5e387c29 /llvm/lib/Transforms
parent71a9bb2b48fc97284494e105c68619ceb03f08d2 (diff)
downloadbcm5719-llvm-fe3bef091f4322602ed5a8da432dc10910096b45.tar.gz
bcm5719-llvm-fe3bef091f4322602ed5a8da432dc10910096b45.zip
Initializing an unsigned with ~0UL causes the compiler
to complain on x86-64 (gcc 4.1). Use ~0U instead. llvm-svn: 46197
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 667390fd337..6aa1c63f929 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -211,11 +211,11 @@ bool DSE::handleFreeWithNonTrivialDependency(FreeInst* F, Instruction* dep,
Value* depPointer = dependency->getPointerOperand();
const Type* depType = dependency->getOperand(0)->getType();
unsigned depPointerSize = TD.getTypeStoreSize(depType);
-
+
// Check for aliasing
- AliasAnalysis::AliasResult A = AA.alias(F->getPointerOperand(), ~0UL,
+ AliasAnalysis::AliasResult A = AA.alias(F->getPointerOperand(), ~0U,
depPointer, depPointerSize);
-
+
if (A == AliasAnalysis::MustAlias) {
// Remove it!
MD.removeInstruction(dependency);
@@ -324,13 +324,13 @@ bool DSE::handleEndBlock(BasicBlock& BB,
deadPointers.clear();
return MadeChange;
}
-
+
// Get size information for the alloca
- unsigned pointerSize = ~0UL;
+ unsigned pointerSize = ~0U;
if (ConstantInt* C = dyn_cast<ConstantInt>((*I)->getArraySize()))
pointerSize = C->getZExtValue() * \
TD.getABITypeSize((*I)->getAllocatedType());
-
+
// See if the call site touches it
AliasAnalysis::ModRefResult A = AA.getModRefInfo(CS, *I, pointerSize);
@@ -392,14 +392,14 @@ bool DSE::RemoveUndeadPointers(Value* killPointer,
for (SmallPtrSet<AllocaInst*, 64>::iterator I = deadPointers.begin(),
E = deadPointers.end(); I != E; ++I) {
// Get size information for the alloca
- unsigned pointerSize = ~0UL;
+ unsigned pointerSize = ~0U;
if (ConstantInt* C = dyn_cast<ConstantInt>((*I)->getArraySize()))
pointerSize = C->getZExtValue() * \
TD.getABITypeSize((*I)->getAllocatedType());
-
+
// See if this pointer could alias it
AliasAnalysis::AliasResult A = AA.alias(*I, pointerSize,
- killPointer, ~0UL);
+ killPointer, ~0U);
// If it must-alias and a store, we can delete it
if (isa<StoreInst>(BBI) && A == AliasAnalysis::MustAlias) {
OpenPOWER on IntegriCloud