summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/DeadStoreElimination.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2011-01-24 18:53:32 +0000
committerDan Gohman <gohman@apple.com>2011-01-24 18:53:32 +0000
commitbd1801b5553c8be3960255a92738464e0010b6f6 (patch)
tree838d8bf88ac48fbc8cc9df6be1cbc9df3067e2f7 /lib/Transforms/Scalar/DeadStoreElimination.cpp
parent0e3fae27a1634f51943d06588e32a550dae6a4b9 (diff)
downloadllvm-bd1801b5553c8be3960255a92738464e0010b6f6.tar.gz
llvm-bd1801b5553c8be3960255a92738464e0010b6f6.tar.bz2
llvm-bd1801b5553c8be3960255a92738464e0010b6f6.tar.xz
Give GetUnderlyingObject a TargetData, to keep it in sync
with BasicAA's DecomposeGEPExpression, which recently began using a TargetData. This fixes PR8968, though the testcase is awkward to reduce. Also, update several off GetUnderlyingObject's users which happen to have a TargetData handy to pass it in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124134 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/DeadStoreElimination.cpp')
-rw-r--r--lib/Transforms/Scalar/DeadStoreElimination.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 5fdb885e2f..867a06ad20 100644
--- a/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -321,7 +321,8 @@ static bool isCompleteOverwrite(const AliasAnalysis::Location &Later,
// other store to the same object.
const TargetData &TD = *AA.getTargetData();
- const Value *UO1 = GetUnderlyingObject(P1), *UO2 = GetUnderlyingObject(P2);
+ const Value *UO1 = GetUnderlyingObject(P1, &TD),
+ *UO2 = GetUnderlyingObject(P2, &TD);
// If we can't resolve the same pointers to the same object, then we can't
// analyze them at all.