diff options
author | Philip Reames <listmail@philipreames.com> | 2016-01-06 04:43:03 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2016-01-06 04:43:03 +0000 |
commit | cdf46d1b52e976bdad3d383cdec0989cc9747c83 (patch) | |
tree | b8fe2c13257db95ef74354be31b9a09d0a671cbb /llvm/lib/Analysis/BasicAliasAnalysis.cpp | |
parent | c86ed0055d24ee591490dc8043f364156ae4ea8a (diff) | |
download | llvm-cdf46d1b52e976bdad3d383cdec0989cc9747c83.zip llvm-cdf46d1b52e976bdad3d383cdec0989cc9747c83.tar.gz llvm-cdf46d1b52e976bdad3d383cdec0989cc9747c83.tar.bz2 |
[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
llvm-svn: 256910
Diffstat (limited to 'llvm/lib/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/BasicAliasAnalysis.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index 00f346e..ace596d 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -599,9 +599,11 @@ ModRefInfo BasicAAResult::getArgModRefInfo(ImmutableCallSite CS, 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 |