Make BasicAliasAnalysis recognize the fact a noalias argument cannot alias another argument, even if the other argument is not itself marked noalias.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182755 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Kuperstein
2013-05-28 08:17:48 +00:00
parent af10fe63c6
commit 9f5de6dadc
4 changed files with 51 additions and 4 deletions
+9
View File
@@ -537,6 +537,15 @@ bool llvm::isNoAliasCall(const Value *V) {
return false;
}
/// isNoAliasArgument - Return true if this is an argument with the noalias
/// attribute.
bool llvm::isNoAliasArgument(const Value *V)
{
if (const Argument *A = dyn_cast<Argument>(V))
return A->hasNoAliasAttr();
return false;
}
/// isIdentifiedObject - Return true if this pointer refers to a distinct and
/// identifiable object. This returns true for:
/// Global Variables and Functions (but not Global Aliases)