summaryrefslogtreecommitdiff
path: root/lib/Analysis/MemoryDependenceAnalysis.cpp
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2013-01-31 02:00:45 +0000
committerDan Gohman <dan433584@gmail.com>2013-01-31 02:00:45 +0000
commita070d2a0355c4993240b5206ebc1d517c151331d (patch)
tree54ab242655acfe79ed7e42f8576b0f6135433567 /lib/Analysis/MemoryDependenceAnalysis.cpp
parent8ed701da9aa388c078cc6aecac2fe355974c90d2 (diff)
downloadllvm-a070d2a0355c4993240b5206ebc1d517c151331d.tar.gz
llvm-a070d2a0355c4993240b5206ebc1d517c151331d.tar.bz2
llvm-a070d2a0355c4993240b5206ebc1d517c151331d.tar.xz
Change GetPointerBaseWithConstantOffset's DataLayout argument from a
reference to a pointer, so that it can handle the case where DataLayout is not available and behave conservatively. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r--lib/Analysis/MemoryDependenceAnalysis.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp
index eee7607d04..5cb0016885 100644
--- a/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -262,7 +262,7 @@ isLoadLoadClobberIfExtendedToFullWidth(const AliasAnalysis::Location &MemLoc,
// If we haven't already computed the base/offset of MemLoc, do so now.
if (MemLocBase == 0)
- MemLocBase = GetPointerBaseWithConstantOffset(MemLoc.Ptr, MemLocOffs, *TD);
+ MemLocBase = GetPointerBaseWithConstantOffset(MemLoc.Ptr, MemLocOffs, TD);
unsigned Size = MemoryDependenceAnalysis::
getLoadLoadClobberFullWidthSize(MemLocBase, MemLocOffs, MemLoc.Size,
@@ -287,7 +287,7 @@ getLoadLoadClobberFullWidthSize(const Value *MemLocBase, int64_t MemLocOffs,
// Get the base of this load.
int64_t LIOffs = 0;
const Value *LIBase =
- GetPointerBaseWithConstantOffset(LI->getPointerOperand(), LIOffs, TD);
+ GetPointerBaseWithConstantOffset(LI->getPointerOperand(), LIOffs, &TD);
// If the two pointers are not based on the same pointer, we can't tell that
// they are related.