From f27f115ef5d62b9dccfb0201da0008a8b8914cd3 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Sun, 22 Nov 2009 02:38:11 +0000 Subject: [PATCH] Remove dead code. While there, also turn a few 'T* ' into 'T *' to match the rest of the file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89577 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/MemoryDependenceAnalysis.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index 0ec0e74233b..caacad2c60d 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -117,10 +117,6 @@ getCallSiteDependencyFrom(CallSite CS, bool isReadOnlyCall, Pointer = Inst->getOperand(1); // calls to free() erase the entire structure PointerSize = ~0ULL; - } else if (isFreeCall(Inst)) { - Pointer = Inst->getOperand(0); - // calls to free() erase the entire structure - PointerSize = ~0ULL; } else if (isa(Inst) || isa(Inst)) { // Debug intrinsics don't cause dependences. if (isa(Inst)) continue; @@ -174,7 +170,7 @@ MemDepResult MemoryDependenceAnalysis:: getPointerDependencyFrom(Value *MemPtr, uint64_t MemSize, bool isLoad, BasicBlock::iterator ScanIt, BasicBlock *BB) { - Value* invariantTag = 0; + Value *invariantTag = 0; // Walk backwards through the basic block, looking for dependencies. while (ScanIt != BB->begin()) { @@ -185,12 +181,12 @@ getPointerDependencyFrom(Value *MemPtr, uint64_t MemSize, bool isLoad, if (invariantTag == Inst) { invariantTag = 0; continue; - } else if (IntrinsicInst* II = dyn_cast(Inst)) { + } else if (IntrinsicInst *II = dyn_cast(Inst)) { // If we pass an invariant-end marker, then we've just entered an // invariant region and can start ignoring dependencies. if (II->getIntrinsicID() == Intrinsic::invariant_end) { uint64_t invariantSize = ~0ULL; - if (ConstantInt* CI = dyn_cast(II->getOperand(2))) + if (ConstantInt *CI = dyn_cast(II->getOperand(2))) invariantSize = CI->getZExtValue(); AliasAnalysis::AliasResult R = @@ -205,7 +201,7 @@ getPointerDependencyFrom(Value *MemPtr, uint64_t MemSize, bool isLoad, } else if (II->getIntrinsicID() == Intrinsic::lifetime_start || II->getIntrinsicID() == Intrinsic::lifetime_end) { uint64_t invariantSize = ~0ULL; - if (ConstantInt* CI = dyn_cast(II->getOperand(1))) + if (ConstantInt *CI = dyn_cast(II->getOperand(1))) invariantSize = CI->getZExtValue(); AliasAnalysis::AliasResult R =