diff options
author | Duncan Sands <baldrick@free.fr> | 2007-12-01 07:51:45 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2007-12-01 07:51:45 +0000 |
commit | dff6710717b159f089c76a07eda074eb6347eb92 (patch) | |
tree | 7bbd754ebe64f5d4bbc6000e0e66bdd99f9c847f /lib/Transforms/Scalar/DeadStoreElimination.cpp | |
parent | e3110d0825e6316fd2dd21d6a4e593295cd413f1 (diff) | |
download | llvm-dff6710717b159f089c76a07eda074eb6347eb92.tar.gz llvm-dff6710717b159f089c76a07eda074eb6347eb92.tar.bz2 llvm-dff6710717b159f089c76a07eda074eb6347eb92.tar.xz |
Integrate the readonly/readnone logic more deeply
into alias analysis. This meant updating the API
which now has versions of the getModRefBehavior,
doesNotAccessMemory and onlyReadsMemory methods
which take a callsite parameter. These should be
used unless the callsite is not known, since in
general they can do a better job than the versions
that take a function. Also, users should no longer
call the version of getModRefBehavior that takes
both a function and a callsite. To reduce the
chance of misuse it is now protected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/DeadStoreElimination.cpp')
-rw-r--r-- | lib/Transforms/Scalar/DeadStoreElimination.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/DeadStoreElimination.cpp b/lib/Transforms/Scalar/DeadStoreElimination.cpp index b19077f1fc..8e69d9ad68 100644 --- a/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -306,8 +306,7 @@ bool DSE::handleEndBlock(BasicBlock& BB, // If this call does not access memory, it can't // be undeadifying any of our pointers. CallSite CS = CallSite::get(BBI); - if (CS.getCalledFunction() && - AA.doesNotAccessMemory(CS.getCalledFunction())) + if (AA.doesNotAccessMemory(CS)) continue; unsigned modRef = 0; |