[llvm] r256910 - [BasicAA] Delete dead code related to memset/memcpy/memmove intrinsics [NFCI]
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 5 20:43:04 PST 2016
Author: reames
Date: Tue Jan 5 22:43:03 2016
New Revision: 256910
URL: http://llvm.org/viewvc/llvm-project?rev=256910&view=rev
Log:
[BasicAA] Delete dead code related to memset/memcpy/memmove intrinsics [NFCI]
We only need to describe the writeonly property of one of the arguments. All of the rest of the semantics are nicely described by existing attributes in Intrinsics.td.
Differential Revision: http://reviews.llvm.org/D15880
Modified:
llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=256910&r1=256909&r2=256910&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Tue Jan 5 22:43:03 2016
@@ -599,9 +599,11 @@ ModRefInfo BasicAAResult::getArgModRefIn
case Intrinsic::memset:
case Intrinsic::memcpy:
case Intrinsic::memmove:
- assert((ArgIdx == 0 || ArgIdx == 1) &&
- "Invalid argument index for memory intrinsic");
- return ArgIdx ? MRI_Ref : MRI_Mod;
+ // We don't currently have a writeonly attribute. All other properties
+ // of these intrinsics are nicely described via attributes in
+ // Intrinsics.td and handled generically below.
+ if (ArgIdx == 0)
+ return MRI_Mod;
}
// We can bound the aliasing properties of memset_pattern16 just as we can
More information about the llvm-commits
mailing list