summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorAlina Sbirlea <asbirlea@google.com>2019-09-10 22:35:27 +0000
committerAlina Sbirlea <asbirlea@google.com>2019-09-10 22:35:27 +0000
commitf7b4022db1746fb9b22114d83fe690755e7f0cf5 (patch)
treea039c3998b20715128c175b9af7a3d7e664787e1 /llvm/lib/Analysis
parentaac114ca140f323f17cf46d0c0d5319547f20f19 (diff)
downloadbcm5719-llvm-f7b4022db1746fb9b22114d83fe690755e7f0cf5.tar.gz
bcm5719-llvm-f7b4022db1746fb9b22114d83fe690755e7f0cf5.zip
[MemorySSA] Do not create memoryaccesses for debug info intrinsics.
Summary: Do not model debuginfo intrinsics in MemorySSA. Regularly these are non-memory modifying instructions. With -disable-basicaa, they were being modelled as Defs. Reviewers: george.burgess.iv Subscribers: aprantl, Prazek, sanjoy.google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67307 llvm-svn: 371565
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/MemorySSA.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp
index 442d0b45fee..db12fcee3ef 100644
--- a/llvm/lib/Analysis/MemorySSA.cpp
+++ b/llvm/lib/Analysis/MemorySSA.cpp
@@ -285,6 +285,11 @@ instructionClobbersQuery(const MemoryDef *MD, const MemoryLocation &UseLoc,
case Intrinsic::invariant_end:
case Intrinsic::assume:
return {false, NoAlias};
+ case Intrinsic::dbg_addr:
+ case Intrinsic::dbg_declare:
+ case Intrinsic::dbg_label:
+ case Intrinsic::dbg_value:
+ llvm_unreachable("debuginfo shouldn't have associated defs!");
default:
break;
}
@@ -1725,11 +1730,13 @@ MemoryUseOrDef *MemorySSA::createNewAccess(Instruction *I,
AliasAnalysisType *AAP,
const MemoryUseOrDef *Template) {
// The assume intrinsic has a control dependency which we model by claiming
- // that it writes arbitrarily. Ignore that fake memory dependency here.
+ // that it writes arbitrarily. Debuginfo intrinsics may be considered
+ // clobbers when we have a nonstandard AA pipeline. Ignore these fake memory
+ // dependencies here.
// FIXME: Replace this special casing with a more accurate modelling of
// assume's control dependency.
if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I))
- if (II->getIntrinsicID() == Intrinsic::assume)
+ if (II->getIntrinsicID() == Intrinsic::assume || isa<DbgInfoIntrinsic>(II))
return nullptr;
bool Def, Use;
OpenPOWER on IntegriCloud