Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | //===- MemoryDependenceAnalysis.cpp - Mem Deps Implementation --*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 081ce94 | 2007-12-29 20:36:04 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file implements an analysis that determines, for a given memory |
| 11 | // operation, what preceding memory operations it depends on. It builds on |
Owen Anderson | afe840e | 2007-08-08 22:01:54 +0000 | [diff] [blame] | 12 | // alias analysis information, and tries to provide a lazy, caching interface to |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 13 | // a common kind of alias information query. |
| 14 | // |
| 15 | //===----------------------------------------------------------------------===// |
| 16 | |
Chris Lattner | 969470c | 2008-11-28 21:45:17 +0000 | [diff] [blame] | 17 | #define DEBUG_TYPE "memdep" |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 18 | #include "llvm/Analysis/MemoryDependenceAnalysis.h" |
| 19 | #include "llvm/Constants.h" |
| 20 | #include "llvm/Instructions.h" |
| 21 | #include "llvm/Function.h" |
| 22 | #include "llvm/Analysis/AliasAnalysis.h" |
Chris Lattner | 5263803 | 2008-11-28 22:28:27 +0000 | [diff] [blame] | 23 | #include "llvm/ADT/Statistic.h" |
| 24 | #include "llvm/ADT/STLExtras.h" |
Owen Anderson | 4c29547 | 2007-07-24 21:52:37 +0000 | [diff] [blame] | 25 | #include "llvm/Support/CFG.h" |
Tanya Lattner | 8edb2b7 | 2008-02-06 00:54:55 +0000 | [diff] [blame] | 26 | #include "llvm/Support/CommandLine.h" |
Chris Lattner | 969470c | 2008-11-28 21:45:17 +0000 | [diff] [blame] | 27 | #include "llvm/Support/Debug.h" |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 28 | #include "llvm/Target/TargetData.h" |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 29 | using namespace llvm; |
| 30 | |
Owen Anderson | d6c7fea | 2007-09-09 21:43:49 +0000 | [diff] [blame] | 31 | STATISTIC(NumCacheNonlocal, "Number of cached non-local responses"); |
| 32 | STATISTIC(NumUncacheNonlocal, "Number of uncached non-local responses"); |
| 33 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 34 | char MemoryDependenceAnalysis::ID = 0; |
| 35 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 36 | // Register this pass... |
| 37 | static RegisterPass<MemoryDependenceAnalysis> X("memdep", |
Chris Lattner | 969470c | 2008-11-28 21:45:17 +0000 | [diff] [blame] | 38 | "Memory Dependence Analysis", false, true); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 39 | |
Chris Lattner | 969470c | 2008-11-28 21:45:17 +0000 | [diff] [blame] | 40 | /// verifyRemoved - Verify that the specified instruction does not occur |
| 41 | /// in our internal data structures. |
Chris Lattner | 48b2469 | 2008-11-28 21:42:09 +0000 | [diff] [blame] | 42 | void MemoryDependenceAnalysis::verifyRemoved(Instruction *D) const { |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 43 | for (LocalDepMapType::const_iterator I = LocalDeps.begin(), |
| 44 | E = LocalDeps.end(); I != E; ++I) { |
Chris Lattner | 969470c | 2008-11-28 21:45:17 +0000 | [diff] [blame] | 45 | assert(I->first != D && "Inst occurs in data structures"); |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 46 | assert(I->second.getPointer() != D && |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 47 | "Inst occurs in data structures"); |
Owen Anderson | c772be7 | 2007-12-08 01:37:09 +0000 | [diff] [blame] | 48 | } |
| 49 | |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 50 | for (NonLocalDepMapType::const_iterator I = NonLocalDeps.begin(), |
| 51 | E = NonLocalDeps.end(); I != E; ++I) { |
Chris Lattner | 969470c | 2008-11-28 21:45:17 +0000 | [diff] [blame] | 52 | assert(I->first != D && "Inst occurs in data structures"); |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 53 | for (DenseMap<BasicBlock*, DepResultTy>::iterator II = I->second.begin(), |
Owen Anderson | c8f3336 | 2008-06-01 20:51:41 +0000 | [diff] [blame] | 54 | EE = I->second.end(); II != EE; ++II) |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 55 | assert(II->second.getPointer() != D && "Inst occurs in data structures"); |
Owen Anderson | c772be7 | 2007-12-08 01:37:09 +0000 | [diff] [blame] | 56 | } |
| 57 | |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 58 | for (ReverseDepMapType::const_iterator I = ReverseLocalDeps.begin(), |
| 59 | E = ReverseLocalDeps.end(); I != E; ++I) |
Chris Lattner | 48b2469 | 2008-11-28 21:42:09 +0000 | [diff] [blame] | 60 | for (SmallPtrSet<Instruction*, 4>::const_iterator II = I->second.begin(), |
| 61 | EE = I->second.end(); II != EE; ++II) |
Chris Lattner | 969470c | 2008-11-28 21:45:17 +0000 | [diff] [blame] | 62 | assert(*II != D && "Inst occurs in data structures"); |
Owen Anderson | c772be7 | 2007-12-08 01:37:09 +0000 | [diff] [blame] | 63 | |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 64 | for (ReverseDepMapType::const_iterator I = ReverseNonLocalDeps.begin(), |
| 65 | E = ReverseNonLocalDeps.end(); |
Owen Anderson | c772be7 | 2007-12-08 01:37:09 +0000 | [diff] [blame] | 66 | I != E; ++I) |
Chris Lattner | 48b2469 | 2008-11-28 21:42:09 +0000 | [diff] [blame] | 67 | for (SmallPtrSet<Instruction*, 4>::const_iterator II = I->second.begin(), |
| 68 | EE = I->second.end(); II != EE; ++II) |
Chris Lattner | 969470c | 2008-11-28 21:45:17 +0000 | [diff] [blame] | 69 | assert(*II != D && "Inst occurs in data structures"); |
Owen Anderson | c772be7 | 2007-12-08 01:37:09 +0000 | [diff] [blame] | 70 | } |
| 71 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 72 | /// getAnalysisUsage - Does not modify anything. It uses Alias Analysis. |
| 73 | /// |
| 74 | void MemoryDependenceAnalysis::getAnalysisUsage(AnalysisUsage &AU) const { |
| 75 | AU.setPreservesAll(); |
| 76 | AU.addRequiredTransitive<AliasAnalysis>(); |
| 77 | AU.addRequiredTransitive<TargetData>(); |
| 78 | } |
| 79 | |
Owen Anderson | 3de3c53 | 2007-08-08 22:26:03 +0000 | [diff] [blame] | 80 | /// getCallSiteDependency - Private helper for finding the local dependencies |
| 81 | /// of a call site. |
Chris Lattner | 12cafbf | 2008-11-29 02:29:27 +0000 | [diff] [blame] | 82 | MemDepResult MemoryDependenceAnalysis:: |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 83 | getCallSiteDependency(CallSite C, BasicBlock::iterator ScanIt, |
| 84 | BasicBlock *BB) { |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 85 | AliasAnalysis &AA = getAnalysis<AliasAnalysis>(); |
| 86 | TargetData &TD = getAnalysis<TargetData>(); |
Owen Anderson | e84f4bc | 2007-08-07 00:33:45 +0000 | [diff] [blame] | 87 | |
Owen Anderson | 3de3c53 | 2007-08-08 22:26:03 +0000 | [diff] [blame] | 88 | // Walk backwards through the block, looking for dependencies |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 89 | while (ScanIt != BB->begin()) { |
| 90 | Instruction *Inst = --ScanIt; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 91 | |
| 92 | // If this inst is a memory op, get the pointer it accessed |
Chris Lattner | 18bd245 | 2008-11-29 09:15:21 +0000 | [diff] [blame] | 93 | Value *Pointer = 0; |
| 94 | uint64_t PointerSize = 0; |
| 95 | if (StoreInst *S = dyn_cast<StoreInst>(Inst)) { |
| 96 | Pointer = S->getPointerOperand(); |
| 97 | PointerSize = TD.getTypeStoreSize(S->getOperand(0)->getType()); |
| 98 | } else if (AllocationInst *AI = dyn_cast<AllocationInst>(Inst)) { |
| 99 | Pointer = AI; |
| 100 | if (ConstantInt *C = dyn_cast<ConstantInt>(AI->getArraySize())) |
Chris Lattner | ade40a2 | 2008-11-29 21:22:42 +0000 | [diff] [blame^] | 101 | // Use ABI size (size between elements), not store size (size of one |
| 102 | // element without padding). |
Chris Lattner | 18bd245 | 2008-11-29 09:15:21 +0000 | [diff] [blame] | 103 | PointerSize = C->getZExtValue() * |
Chris Lattner | ade40a2 | 2008-11-29 21:22:42 +0000 | [diff] [blame^] | 104 | TD.getABITypeSize(AI->getAllocatedType()); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 105 | else |
Chris Lattner | 18bd245 | 2008-11-29 09:15:21 +0000 | [diff] [blame] | 106 | PointerSize = ~0UL; |
| 107 | } else if (VAArgInst *V = dyn_cast<VAArgInst>(Inst)) { |
| 108 | Pointer = V->getOperand(0); |
| 109 | PointerSize = TD.getTypeStoreSize(V->getType()); |
| 110 | } else if (FreeInst *F = dyn_cast<FreeInst>(Inst)) { |
| 111 | Pointer = F->getPointerOperand(); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 112 | |
| 113 | // FreeInsts erase the entire structure |
Chris Lattner | 18bd245 | 2008-11-29 09:15:21 +0000 | [diff] [blame] | 114 | PointerSize = ~0UL; |
| 115 | } else if (isa<CallInst>(Inst) || isa<InvokeInst>(Inst)) { |
| 116 | if (AA.getModRefBehavior(CallSite::get(Inst)) == |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 117 | AliasAnalysis::DoesNotAccessMemory) |
Chris Lattner | 18bd245 | 2008-11-29 09:15:21 +0000 | [diff] [blame] | 118 | continue; |
| 119 | return MemDepResult::get(Inst); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 120 | } else |
| 121 | continue; |
| 122 | |
Chris Lattner | 18bd245 | 2008-11-29 09:15:21 +0000 | [diff] [blame] | 123 | if (AA.getModRefInfo(C, Pointer, PointerSize) != AliasAnalysis::NoModRef) |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 124 | return MemDepResult::get(Inst); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 125 | } |
| 126 | |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 127 | // No dependence found. |
Chris Lattner | 12cafbf | 2008-11-29 02:29:27 +0000 | [diff] [blame] | 128 | return MemDepResult::getNonLocal(); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 129 | } |
| 130 | |
Chris Lattner | ade40a2 | 2008-11-29 21:22:42 +0000 | [diff] [blame^] | 131 | /// getNonLocalDependency - Perform a full dependency query for the |
| 132 | /// specified instruction, returning the set of blocks that the value is |
| 133 | /// potentially live across. The returned set of results will include a |
| 134 | /// "NonLocal" result for all blocks where the value is live across. |
| 135 | /// |
| 136 | /// This method assumes the instruction returns a "nonlocal" dependency |
| 137 | /// within its own block. |
| 138 | /// |
| 139 | void MemoryDependenceAnalysis::getNonLocalDependency(Instruction *QueryInst, |
| 140 | DenseMap<BasicBlock*, MemDepResult> &Result) { |
| 141 | assert(getDependency(QueryInst).isNonLocal() && |
| 142 | "getNonLocalDependency should only be used on insts with non-local deps!"); |
| 143 | DenseMap<BasicBlock*, DepResultTy> &Cache = NonLocalDeps[QueryInst]; |
Owen Anderson | 4c29547 | 2007-07-24 21:52:37 +0000 | [diff] [blame] | 144 | |
Chris Lattner | ade40a2 | 2008-11-29 21:22:42 +0000 | [diff] [blame^] | 145 | /// DirtyBlocks - This is the set of blocks that need to be recomputed. This |
| 146 | /// can happen due to instructions being deleted etc. |
| 147 | SmallVector<BasicBlock*, 32> DirtyBlocks; |
| 148 | |
| 149 | if (!Cache.empty()) { |
| 150 | // If we already have a partially computed set of results, scan them to |
| 151 | // determine what is dirty, seeding our initial DirtyBlocks worklist. |
| 152 | // FIXME: In the "don't need to be updated" case, this is expensive, why not |
| 153 | // have a per-"cache" flag saying it is undirty? |
| 154 | for (DenseMap<BasicBlock*, DepResultTy>::iterator I = Cache.begin(), |
| 155 | E = Cache.end(); I != E; ++I) |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 156 | if (I->second.getInt() == Dirty) |
Chris Lattner | ade40a2 | 2008-11-29 21:22:42 +0000 | [diff] [blame^] | 157 | DirtyBlocks.push_back(I->first); |
Owen Anderson | 0574907 | 2007-09-21 03:53:52 +0000 | [diff] [blame] | 158 | |
Chris Lattner | ade40a2 | 2008-11-29 21:22:42 +0000 | [diff] [blame^] | 159 | NumCacheNonlocal++; |
| 160 | } else { |
| 161 | // Seed DirtyBlocks with each of the preds of QueryInst's block. |
| 162 | BasicBlock *QueryBB = QueryInst->getParent(); |
| 163 | // FIXME: use range insertion/append. |
| 164 | for (pred_iterator PI = pred_begin(QueryBB), E = pred_end(QueryBB); |
| 165 | PI != E; ++PI) |
| 166 | DirtyBlocks.push_back(*PI); |
| 167 | NumUncacheNonlocal++; |
Chris Lattner | 12cafbf | 2008-11-29 02:29:27 +0000 | [diff] [blame] | 168 | } |
Chris Lattner | 12cafbf | 2008-11-29 02:29:27 +0000 | [diff] [blame] | 169 | |
Chris Lattner | ade40a2 | 2008-11-29 21:22:42 +0000 | [diff] [blame^] | 170 | // Iterate while we still have blocks to update. |
| 171 | while (!DirtyBlocks.empty()) { |
| 172 | BasicBlock *DirtyBB = DirtyBlocks.back(); |
| 173 | DirtyBlocks.pop_back(); |
| 174 | |
| 175 | // Get the entry for this block. Note that this relies on DepResultTy |
| 176 | // default initializing to Dirty. |
| 177 | DepResultTy &DirtyBBEntry = Cache[DirtyBB]; |
| 178 | |
| 179 | // If DirtyBBEntry isn't dirty, it ended up on the worklist multiple times. |
| 180 | if (DirtyBBEntry.getInt() != Dirty) continue; |
| 181 | |
| 182 | // Find out if this block has a local dependency for QueryInst. |
| 183 | // FIXME: If the dirty entry has an instruction pointer, scan from it! |
| 184 | // FIXME: Don't convert back and forth for MemDepResult <-> DepResultTy. |
| 185 | DirtyBBEntry = ConvFromResult(getDependencyFrom(QueryInst, DirtyBB->end(), |
| 186 | DirtyBB)); |
| 187 | |
| 188 | // If the block has a dependency (i.e. it isn't completely transparent to |
| 189 | // the value), remember it! |
| 190 | if (DirtyBBEntry.getInt() != NonLocal) { |
| 191 | // Keep the ReverseNonLocalDeps map up to date so we can efficiently |
| 192 | // update this when we remove instructions. |
| 193 | if (Instruction *Inst = DirtyBBEntry.getPointer()) |
| 194 | ReverseNonLocalDeps[Inst].insert(QueryInst); |
| 195 | continue; |
| 196 | } |
| 197 | |
| 198 | // If the block *is* completely transparent to the load, we need to check |
| 199 | // the predecessors of this block. Add them to our worklist. |
| 200 | for (pred_iterator I = pred_begin(DirtyBB), E = pred_end(DirtyBB); |
| 201 | I != E; ++I) |
| 202 | DirtyBlocks.push_back(*I); |
Owen Anderson | 2bd46a5 | 2007-08-16 21:27:05 +0000 | [diff] [blame] | 203 | } |
Chris Lattner | ade40a2 | 2008-11-29 21:22:42 +0000 | [diff] [blame^] | 204 | |
| 205 | // Copy the result into the output set. |
| 206 | for (DenseMap<BasicBlock*, DepResultTy>::iterator I = Cache.begin(), |
| 207 | E = Cache.end(); I != E; ++I) |
| 208 | Result[I->first] = ConvToResult(I->second); |
Owen Anderson | 4c29547 | 2007-07-24 21:52:37 +0000 | [diff] [blame] | 209 | } |
| 210 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 211 | /// getDependency - Return the instruction on which a memory operation |
Dan Gohman | f1f99a2 | 2008-04-10 23:02:38 +0000 | [diff] [blame] | 212 | /// depends. The local parameter indicates if the query should only |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 213 | /// evaluate dependencies within the same basic block. |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 214 | MemDepResult MemoryDependenceAnalysis:: |
| 215 | getDependencyFrom(Instruction *QueryInst, BasicBlock::iterator ScanIt, |
| 216 | BasicBlock *BB) { |
| 217 | AliasAnalysis &AA = getAnalysis<AliasAnalysis>(); |
| 218 | TargetData &TD = getAnalysis<TargetData>(); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 219 | |
| 220 | // Get the pointer value for which dependence will be determined |
Chris Lattner | ac5d6e9 | 2008-11-29 08:51:16 +0000 | [diff] [blame] | 221 | Value *MemPtr = 0; |
| 222 | uint64_t MemSize = 0; |
| 223 | bool MemVolatile = false; |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 224 | |
| 225 | if (StoreInst* S = dyn_cast<StoreInst>(QueryInst)) { |
Chris Lattner | ac5d6e9 | 2008-11-29 08:51:16 +0000 | [diff] [blame] | 226 | MemPtr = S->getPointerOperand(); |
| 227 | MemSize = TD.getTypeStoreSize(S->getOperand(0)->getType()); |
| 228 | MemVolatile = S->isVolatile(); |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 229 | } else if (LoadInst* L = dyn_cast<LoadInst>(QueryInst)) { |
Chris Lattner | ac5d6e9 | 2008-11-29 08:51:16 +0000 | [diff] [blame] | 230 | MemPtr = L->getPointerOperand(); |
| 231 | MemSize = TD.getTypeStoreSize(L->getType()); |
| 232 | MemVolatile = L->isVolatile(); |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 233 | } else if (VAArgInst* V = dyn_cast<VAArgInst>(QueryInst)) { |
Chris Lattner | ac5d6e9 | 2008-11-29 08:51:16 +0000 | [diff] [blame] | 234 | MemPtr = V->getOperand(0); |
| 235 | MemSize = TD.getTypeStoreSize(V->getType()); |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 236 | } else if (FreeInst* F = dyn_cast<FreeInst>(QueryInst)) { |
Chris Lattner | ac5d6e9 | 2008-11-29 08:51:16 +0000 | [diff] [blame] | 237 | MemPtr = F->getPointerOperand(); |
| 238 | // FreeInsts erase the entire structure, not just a field. |
| 239 | MemSize = ~0UL; |
| 240 | } else if (isa<CallInst>(QueryInst) || isa<InvokeInst>(QueryInst)) |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 241 | return getCallSiteDependency(CallSite::get(QueryInst), ScanIt, BB); |
Chris Lattner | ac5d6e9 | 2008-11-29 08:51:16 +0000 | [diff] [blame] | 242 | else // Non-memory instructions depend on nothing. |
Chris Lattner | 12cafbf | 2008-11-29 02:29:27 +0000 | [diff] [blame] | 243 | return MemDepResult::getNone(); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 244 | |
Owen Anderson | 3de3c53 | 2007-08-08 22:26:03 +0000 | [diff] [blame] | 245 | // Walk backwards through the basic block, looking for dependencies |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 246 | while (ScanIt != BB->begin()) { |
| 247 | Instruction *Inst = --ScanIt; |
Chris Lattner | 4103c3c | 2008-11-29 09:09:48 +0000 | [diff] [blame] | 248 | |
| 249 | // If the access is volatile and this is a volatile load/store, return a |
| 250 | // dependence. |
| 251 | if (MemVolatile && |
| 252 | ((isa<LoadInst>(Inst) && cast<LoadInst>(Inst)->isVolatile()) || |
| 253 | (isa<StoreInst>(Inst) && cast<StoreInst>(Inst)->isVolatile()))) |
Chris Lattner | ac5d6e9 | 2008-11-29 08:51:16 +0000 | [diff] [blame] | 254 | return MemDepResult::get(Inst); |
Chris Lattner | 4103c3c | 2008-11-29 09:09:48 +0000 | [diff] [blame] | 255 | |
| 256 | // MemDep is broken w.r.t. loads: it says that two loads of the same pointer |
| 257 | // depend on each other. :( |
| 258 | // FIXME: ELIMINATE THIS! |
| 259 | if (LoadInst *L = dyn_cast<LoadInst>(Inst)) { |
| 260 | Value *Pointer = L->getPointerOperand(); |
| 261 | uint64_t PointerSize = TD.getTypeStoreSize(L->getType()); |
| 262 | |
| 263 | // If we found a pointer, check if it could be the same as our pointer |
| 264 | AliasAnalysis::AliasResult R = |
| 265 | AA.alias(Pointer, PointerSize, MemPtr, MemSize); |
| 266 | |
| 267 | if (R == AliasAnalysis::NoAlias) |
| 268 | continue; |
| 269 | |
| 270 | // May-alias loads don't depend on each other without a dependence. |
| 271 | if (isa<LoadInst>(QueryInst) && R == AliasAnalysis::MayAlias) |
| 272 | continue; |
| 273 | return MemDepResult::get(Inst); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 274 | } |
| 275 | |
Chris Lattner | 4103c3c | 2008-11-29 09:09:48 +0000 | [diff] [blame] | 276 | // FIXME: This claims that an access depends on the allocation. This may |
| 277 | // make sense, but is dubious at best. It would be better to fix GVN to |
| 278 | // handle a 'None' Query. |
| 279 | if (AllocationInst *AI = dyn_cast<AllocationInst>(Inst)) { |
| 280 | Value *Pointer = AI; |
| 281 | uint64_t PointerSize; |
| 282 | if (ConstantInt *C = dyn_cast<ConstantInt>(AI->getArraySize())) |
Chris Lattner | ade40a2 | 2008-11-29 21:22:42 +0000 | [diff] [blame^] | 283 | // Use ABI size (size between elements), not store size (size of one |
| 284 | // element without padding). |
Chris Lattner | 4103c3c | 2008-11-29 09:09:48 +0000 | [diff] [blame] | 285 | PointerSize = C->getZExtValue() * |
Chris Lattner | ade40a2 | 2008-11-29 21:22:42 +0000 | [diff] [blame^] | 286 | TD.getABITypeSize(AI->getAllocatedType()); |
Chris Lattner | 4103c3c | 2008-11-29 09:09:48 +0000 | [diff] [blame] | 287 | else |
| 288 | PointerSize = ~0UL; |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 289 | |
Chris Lattner | 4103c3c | 2008-11-29 09:09:48 +0000 | [diff] [blame] | 290 | AliasAnalysis::AliasResult R = |
| 291 | AA.alias(Pointer, PointerSize, MemPtr, MemSize); |
| 292 | |
| 293 | if (R == AliasAnalysis::NoAlias) |
| 294 | continue; |
| 295 | return MemDepResult::get(Inst); |
| 296 | } |
| 297 | |
| 298 | |
| 299 | // See if this instruction mod/ref's the pointer. |
| 300 | AliasAnalysis::ModRefResult MRR = AA.getModRefInfo(Inst, MemPtr, MemSize); |
| 301 | |
| 302 | if (MRR == AliasAnalysis::NoModRef) |
Chris Lattner | ac5d6e9 | 2008-11-29 08:51:16 +0000 | [diff] [blame] | 303 | continue; |
| 304 | |
Chris Lattner | 4103c3c | 2008-11-29 09:09:48 +0000 | [diff] [blame] | 305 | // Loads don't depend on read-only instructions. |
| 306 | if (isa<LoadInst>(QueryInst) && MRR == AliasAnalysis::Ref) |
Chris Lattner | ac5d6e9 | 2008-11-29 08:51:16 +0000 | [diff] [blame] | 307 | continue; |
Chris Lattner | 4103c3c | 2008-11-29 09:09:48 +0000 | [diff] [blame] | 308 | |
| 309 | // Otherwise, there is a dependence. |
Chris Lattner | ac5d6e9 | 2008-11-29 08:51:16 +0000 | [diff] [blame] | 310 | return MemDepResult::get(Inst); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 311 | } |
| 312 | |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 313 | // If we found nothing, return the non-local flag. |
Chris Lattner | 12cafbf | 2008-11-29 02:29:27 +0000 | [diff] [blame] | 314 | return MemDepResult::getNonLocal(); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 315 | } |
| 316 | |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 317 | /// getDependency - Return the instruction on which a memory operation |
| 318 | /// depends. |
| 319 | MemDepResult MemoryDependenceAnalysis::getDependency(Instruction *QueryInst) { |
| 320 | Instruction *ScanPos = QueryInst; |
| 321 | |
| 322 | // Check for a cached result |
| 323 | DepResultTy &LocalCache = LocalDeps[QueryInst]; |
| 324 | |
| 325 | // If the cached entry is non-dirty, just return it. |
| 326 | if (LocalCache.getInt() != Dirty) |
| 327 | return ConvToResult(LocalCache); |
| 328 | |
| 329 | // Otherwise, if we have a dirty entry, we know we can start the scan at that |
| 330 | // instruction, which may save us some work. |
| 331 | if (Instruction *Inst = LocalCache.getPointer()) |
| 332 | ScanPos = Inst; |
| 333 | |
| 334 | // Do the scan. |
| 335 | MemDepResult Res = |
| 336 | getDependencyFrom(QueryInst, ScanPos, QueryInst->getParent()); |
| 337 | |
| 338 | // Remember the result! |
| 339 | // FIXME: Don't convert back and forth! Make a shared helper function. |
| 340 | LocalCache = ConvFromResult(Res); |
| 341 | if (Instruction *I = Res.getInst()) |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 342 | ReverseLocalDeps[I].insert(QueryInst); |
Chris Lattner | a5a36c1 | 2008-11-29 03:47:00 +0000 | [diff] [blame] | 343 | |
| 344 | return Res; |
| 345 | } |
| 346 | |
| 347 | |
Owen Anderson | 8d272d5 | 2008-02-12 21:15:18 +0000 | [diff] [blame] | 348 | /// dropInstruction - Remove an instruction from the analysis, making |
| 349 | /// absolutely conservative assumptions when updating the cache. This is |
| 350 | /// useful, for example when an instruction is changed rather than removed. |
| 351 | void MemoryDependenceAnalysis::dropInstruction(Instruction* drop) { |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 352 | LocalDepMapType::iterator depGraphEntry = LocalDeps.find(drop); |
| 353 | if (depGraphEntry != LocalDeps.end()) |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 354 | if (Instruction *Inst = depGraphEntry->second.getPointer()) |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 355 | ReverseLocalDeps[Inst].erase(drop); |
Owen Anderson | 8d272d5 | 2008-02-12 21:15:18 +0000 | [diff] [blame] | 356 | |
| 357 | // Drop dependency information for things that depended on this instr |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 358 | SmallPtrSet<Instruction*, 4>& set = ReverseLocalDeps[drop]; |
Owen Anderson | 8d272d5 | 2008-02-12 21:15:18 +0000 | [diff] [blame] | 359 | for (SmallPtrSet<Instruction*, 4>::iterator I = set.begin(), E = set.end(); |
| 360 | I != E; ++I) |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 361 | LocalDeps.erase(*I); |
Owen Anderson | 8d272d5 | 2008-02-12 21:15:18 +0000 | [diff] [blame] | 362 | |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 363 | LocalDeps.erase(drop); |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 364 | ReverseLocalDeps.erase(drop); |
Owen Anderson | 8d272d5 | 2008-02-12 21:15:18 +0000 | [diff] [blame] | 365 | |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 366 | for (DenseMap<BasicBlock*, DepResultTy>::iterator DI = |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 367 | NonLocalDeps[drop].begin(), DE = NonLocalDeps[drop].end(); |
Owen Anderson | 8d272d5 | 2008-02-12 21:15:18 +0000 | [diff] [blame] | 368 | DI != DE; ++DI) |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 369 | if (Instruction *Inst = DI->second.getPointer()) |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 370 | ReverseNonLocalDeps[Inst].erase(drop); |
Owen Anderson | 8d272d5 | 2008-02-12 21:15:18 +0000 | [diff] [blame] | 371 | |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 372 | if (ReverseNonLocalDeps.count(drop)) { |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 373 | SmallPtrSet<Instruction*, 4>& set = |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 374 | ReverseNonLocalDeps[drop]; |
Owen Anderson | 8d272d5 | 2008-02-12 21:15:18 +0000 | [diff] [blame] | 375 | for (SmallPtrSet<Instruction*, 4>::iterator I = set.begin(), E = set.end(); |
| 376 | I != E; ++I) |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 377 | for (DenseMap<BasicBlock*, DepResultTy>::iterator DI = |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 378 | NonLocalDeps[*I].begin(), DE = NonLocalDeps[*I].end(); |
Owen Anderson | 8d272d5 | 2008-02-12 21:15:18 +0000 | [diff] [blame] | 379 | DI != DE; ++DI) |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 380 | if (DI->second == DepResultTy(drop, Normal)) |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 381 | // FIXME: Why not remember the old insertion point?? |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 382 | DI->second = DepResultTy(0, Dirty); |
Owen Anderson | 8d272d5 | 2008-02-12 21:15:18 +0000 | [diff] [blame] | 383 | } |
| 384 | |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 385 | ReverseNonLocalDeps.erase(drop); |
| 386 | NonLocalDeps.erase(drop); |
Owen Anderson | 8d272d5 | 2008-02-12 21:15:18 +0000 | [diff] [blame] | 387 | } |
| 388 | |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 389 | /// removeInstruction - Remove an instruction from the dependence analysis, |
| 390 | /// updating the dependence of instructions that previously depended on it. |
Owen Anderson | 3de3c53 | 2007-08-08 22:26:03 +0000 | [diff] [blame] | 391 | /// This method attempts to keep the cache coherent using the reverse map. |
Chris Lattner | 1b185de | 2008-11-28 22:04:47 +0000 | [diff] [blame] | 392 | void MemoryDependenceAnalysis::removeInstruction(Instruction *RemInst) { |
Chris Lattner | 1b185de | 2008-11-28 22:04:47 +0000 | [diff] [blame] | 393 | // Walk through the Non-local dependencies, removing this one as the value |
| 394 | // for any cached queries. |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 395 | for (DenseMap<BasicBlock*, DepResultTy>::iterator DI = |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 396 | NonLocalDeps[RemInst].begin(), DE = NonLocalDeps[RemInst].end(); |
Owen Anderson | c772be7 | 2007-12-08 01:37:09 +0000 | [diff] [blame] | 397 | DI != DE; ++DI) |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 398 | if (Instruction *Inst = DI->second.getPointer()) |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 399 | ReverseNonLocalDeps[Inst].erase(RemInst); |
Owen Anderson | c772be7 | 2007-12-08 01:37:09 +0000 | [diff] [blame] | 400 | |
Chris Lattner | 5263803 | 2008-11-28 22:28:27 +0000 | [diff] [blame] | 401 | // Shortly after this, we will look for things that depend on RemInst. In |
| 402 | // order to update these, we'll need a new dependency to base them on. We |
| 403 | // could completely delete any entries that depend on this, but it is better |
| 404 | // to make a more accurate approximation where possible. Compute that better |
| 405 | // approximation if we can. |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 406 | DepResultTy NewDependency; |
Chris Lattner | 5263803 | 2008-11-28 22:28:27 +0000 | [diff] [blame] | 407 | |
Chris Lattner | 1b185de | 2008-11-28 22:04:47 +0000 | [diff] [blame] | 408 | // If we have a cached local dependence query for this instruction, remove it. |
Chris Lattner | 5263803 | 2008-11-28 22:28:27 +0000 | [diff] [blame] | 409 | // |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 410 | LocalDepMapType::iterator LocalDepEntry = LocalDeps.find(RemInst); |
| 411 | if (LocalDepEntry != LocalDeps.end()) { |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 412 | DepResultTy LocalDep = LocalDepEntry->second; |
Owen Anderson | 25296a2 | 2008-01-30 01:24:05 +0000 | [diff] [blame] | 413 | |
Chris Lattner | 5263803 | 2008-11-28 22:28:27 +0000 | [diff] [blame] | 414 | // Remove this local dependency info. |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 415 | LocalDeps.erase(LocalDepEntry); |
Chris Lattner | 1b185de | 2008-11-28 22:04:47 +0000 | [diff] [blame] | 416 | |
Chris Lattner | 5263803 | 2008-11-28 22:28:27 +0000 | [diff] [blame] | 417 | // Remove us from DepInst's reverse set now that the local dep info is gone. |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 418 | if (Instruction *Inst = LocalDep.getPointer()) |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 419 | ReverseLocalDeps[Inst].erase(RemInst); |
Chris Lattner | 5263803 | 2008-11-28 22:28:27 +0000 | [diff] [blame] | 420 | |
| 421 | // If we have unconfirmed info, don't trust it. |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 422 | if (LocalDep.getInt() != Dirty) { |
Chris Lattner | 5263803 | 2008-11-28 22:28:27 +0000 | [diff] [blame] | 423 | // If we have a confirmed non-local flag, use it. |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 424 | if (LocalDep.getInt() == NonLocal || LocalDep.getInt() == None) { |
Chris Lattner | 89fbbe7 | 2008-11-28 22:51:08 +0000 | [diff] [blame] | 425 | // The only time this dependency is confirmed is if it is non-local. |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 426 | NewDependency = LocalDep; |
Chris Lattner | 5263803 | 2008-11-28 22:28:27 +0000 | [diff] [blame] | 427 | } else { |
| 428 | // If we have dep info for RemInst, set them to it. |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 429 | Instruction *NDI = next(BasicBlock::iterator(LocalDep.getPointer())); |
| 430 | if (NDI != RemInst) // Don't use RemInst for the new dependency! |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 431 | NewDependency = DepResultTy(NDI, Dirty); |
Chris Lattner | 5263803 | 2008-11-28 22:28:27 +0000 | [diff] [blame] | 432 | } |
David Greene | 701171c | 2007-07-31 20:01:27 +0000 | [diff] [blame] | 433 | } |
Owen Anderson | 6487cf5 | 2008-02-05 04:34:03 +0000 | [diff] [blame] | 434 | } |
| 435 | |
Chris Lattner | 5263803 | 2008-11-28 22:28:27 +0000 | [diff] [blame] | 436 | // If we don't already have a local dependency answer for this instruction, |
| 437 | // use the immediate successor of RemInst. We use the successor because |
| 438 | // getDependence starts by checking the immediate predecessor of what is in |
| 439 | // the cache. |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 440 | if (NewDependency == DepResultTy(0, Dirty)) |
| 441 | NewDependency = DepResultTy(next(BasicBlock::iterator(RemInst)), Dirty); |
Chris Lattner | 5263803 | 2008-11-28 22:28:27 +0000 | [diff] [blame] | 442 | |
Chris Lattner | 89fbbe7 | 2008-11-28 22:51:08 +0000 | [diff] [blame] | 443 | // Loop over all of the things that depend on the instruction we're removing. |
| 444 | // |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 445 | ReverseDepMapType::iterator ReverseDepIt = ReverseLocalDeps.find(RemInst); |
| 446 | if (ReverseDepIt != ReverseLocalDeps.end()) { |
Chris Lattner | 89fbbe7 | 2008-11-28 22:51:08 +0000 | [diff] [blame] | 447 | SmallPtrSet<Instruction*, 4> &ReverseDeps = ReverseDepIt->second; |
| 448 | for (SmallPtrSet<Instruction*, 4>::iterator I = ReverseDeps.begin(), |
| 449 | E = ReverseDeps.end(); I != E; ++I) { |
| 450 | Instruction *InstDependingOnRemInst = *I; |
| 451 | |
| 452 | // If we thought the instruction depended on itself (possible for |
| 453 | // unconfirmed dependencies) ignore the update. |
| 454 | if (InstDependingOnRemInst == RemInst) continue; |
| 455 | |
| 456 | // Insert the new dependencies. |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 457 | LocalDeps[InstDependingOnRemInst] = NewDependency; |
Chris Lattner | 89fbbe7 | 2008-11-28 22:51:08 +0000 | [diff] [blame] | 458 | |
| 459 | // If our NewDependency is an instruction, make sure to remember that new |
| 460 | // things depend on it. |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 461 | if (Instruction *Inst = NewDependency.getPointer()) |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 462 | ReverseLocalDeps[Inst].insert(InstDependingOnRemInst); |
Chris Lattner | 89fbbe7 | 2008-11-28 22:51:08 +0000 | [diff] [blame] | 463 | } |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 464 | ReverseLocalDeps.erase(RemInst); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 465 | } |
Owen Anderson | 2bd46a5 | 2007-08-16 21:27:05 +0000 | [diff] [blame] | 466 | |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 467 | ReverseDepIt = ReverseNonLocalDeps.find(RemInst); |
| 468 | if (ReverseDepIt != ReverseNonLocalDeps.end()) { |
Chris Lattner | 89fbbe7 | 2008-11-28 22:51:08 +0000 | [diff] [blame] | 469 | SmallPtrSet<Instruction*, 4>& set = ReverseDepIt->second; |
Owen Anderson | 2bd46a5 | 2007-08-16 21:27:05 +0000 | [diff] [blame] | 470 | for (SmallPtrSet<Instruction*, 4>::iterator I = set.begin(), E = set.end(); |
| 471 | I != E; ++I) |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 472 | for (DenseMap<BasicBlock*, DepResultTy>::iterator |
| 473 | DI = NonLocalDeps[*I].begin(), DE = NonLocalDeps[*I].end(); |
Owen Anderson | 0574907 | 2007-09-21 03:53:52 +0000 | [diff] [blame] | 474 | DI != DE; ++DI) |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 475 | if (DI->second == DepResultTy(RemInst, Normal)) |
Chris Lattner | cb53af0 | 2008-11-29 03:22:12 +0000 | [diff] [blame] | 476 | // FIXME: Why not remember the old insertion point?? |
Chris Lattner | fd9b56d | 2008-11-29 01:43:36 +0000 | [diff] [blame] | 477 | DI->second = DepResultTy(0, Dirty); |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 478 | ReverseNonLocalDeps.erase(ReverseDepIt); |
Owen Anderson | 2bd46a5 | 2007-08-16 21:27:05 +0000 | [diff] [blame] | 479 | } |
Owen Anderson | c772be7 | 2007-12-08 01:37:09 +0000 | [diff] [blame] | 480 | |
Chris Lattner | 83c1a7c | 2008-11-29 09:20:15 +0000 | [diff] [blame] | 481 | NonLocalDeps.erase(RemInst); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 482 | |
Chris Lattner | 1b185de | 2008-11-28 22:04:47 +0000 | [diff] [blame] | 483 | getAnalysis<AliasAnalysis>().deleteValue(RemInst); |
Chris Lattner | 969470c | 2008-11-28 21:45:17 +0000 | [diff] [blame] | 484 | |
Chris Lattner | 1b185de | 2008-11-28 22:04:47 +0000 | [diff] [blame] | 485 | DEBUG(verifyRemoved(RemInst)); |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 486 | } |