aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorHaicheng Wu <haicheng@codeaurora.org>2017-12-15 14:34:41 +0000
committerHaicheng Wu <haicheng@codeaurora.org>2017-12-15 14:34:41 +0000
commita44615155282bb053a68b7f805935a5f71e73d2f (patch)
tree248cd08d1308fd7c67590d8513a2264e0995979d /llvm/lib/Analysis/ValueTracking.cpp
parente2867bc4a07b942724fa3be95c6c671b196fe1ae (diff)
downloadllvm-a44615155282bb053a68b7f805935a5f71e73d2f.zip
llvm-a44615155282bb053a68b7f805935a5f71e73d2f.tar.gz
llvm-a44615155282bb053a68b7f805935a5f71e73d2f.tar.bz2
[InlineCost] Find repeated loads in the callee
SROA analysis of InlineCost can figure out that some stores can be removed after inlining and then the repeated loads clobbered by these stores are also free. This patch finds these clobbered loads and adjust the inline cost accordingly. Differential Revision: https://reviews.llvm.org/D33946 llvm-svn: 320814
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index e086d27..2730dae 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -483,7 +483,7 @@ static bool isEphemeralValueOf(const Instruction *I, const Value *E) {
}
// Is this an intrinsic that cannot be speculated but also cannot trap?
-static bool isAssumeLikeIntrinsic(const Instruction *I) {
+bool llvm::isAssumeLikeIntrinsic(const Instruction *I) {
if (const CallInst *CI = dyn_cast<CallInst>(I))
if (Function *F = CI->getCalledFunction())
switch (F->getIntrinsicID()) {