mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-18 21:24:32 -04:00
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371565 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user