diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-11-20 19:37:06 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-11-20 19:37:06 +0000 |
commit | 6ae03c33785f4381acca0408b81bae814431e77a (patch) | |
tree | ce387a6e61739b10996f9a53d5caf8218d094495 /llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | |
parent | 612d70b19d3f46bf293daa2952127ba8bcb1edf6 (diff) | |
download | bcm5719-llvm-6ae03c33785f4381acca0408b81bae814431e77a.tar.gz bcm5719-llvm-6ae03c33785f4381acca0408b81bae814431e77a.zip |
Less template, more virtual! Refactoring suggested by Chris in code review.
llvm-svn: 145014
Diffstat (limited to 'llvm/lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp index e779bf2b998..128c7f93a4b 100644 --- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -336,7 +336,7 @@ getLoadLoadClobberFullWidthSize(const Value *MemLocBase, int64_t MemLocOffs, namespace { /// Only find pointer captures which happen before the given instruction. Uses /// the dominator tree to determine whether one instruction is before another. - struct CapturesBefore { + struct CapturesBefore : public CaptureTracker { CapturesBefore(const Instruction *I, DominatorTree *DT) : BeforeHere(I), DT(DT), Captured(false) {} @@ -381,7 +381,7 @@ MemoryDependenceAnalysis::getModRefInfo(const Instruction *Inst, if (!CS.getInstruction()) return AliasAnalysis::ModRef; CapturesBefore CB(Inst, DT); - llvm::PointerMayBeCaptured(Object, CB); + llvm::PointerMayBeCaptured(Object, &CB); if (isa<Constant>(Object) || CS.getInstruction() == Object || CB.Captured) return AliasAnalysis::ModRef; |