Generalize some alias analysis logic from atomic

intrinsics to any IntrWriteArgMem intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64551 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands
2009-02-14 10:56:35 +00:00
parent 178eaf37f6
commit d869b3847f
4 changed files with 42 additions and 52 deletions

View File

@ -124,8 +124,13 @@ AliasAnalysis::getModRefBehavior(Function *F,
if (F->doesNotAccessMemory())
// Can't do better than this.
return DoesNotAccessMemory;
else if (F->onlyReadsMemory())
if (F->onlyReadsMemory())
return OnlyReadsMemory;
if (unsigned id = F->getIntrinsicID()) {
#define GET_INTRINSIC_MODREF_BEHAVIOR
#include "llvm/Intrinsics.gen"
#undef GET_INTRINSIC_MODREF_BEHAVIOR
}
}
return UnknownModRefBehavior;
}