Implement review feedback.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40745 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Christopher Lamb 2007-08-02 17:52:00 +00:00
parent 576c8da518
commit a326b5da4b

View File

@ -311,25 +311,25 @@ BasicAliasAnalysis::alias(const Value *V1, unsigned V1Size,
// Pointing at a discernible object?
if (O1) {
if (O2) {
if (isa<Argument>(O1)) {
if (const Argument *O1Arg = dyn_cast<Argument>(O1)) {
// Incoming argument cannot alias locally allocated object!
if (isa<AllocationInst>(O2)) return NoAlias;
// If they are two different objects, and one is a noalias argument
// then they do not alias.
if (O1 != O2 && isNoAliasArgument(cast<Argument>(O1)))
if (O1 != O2 && isNoAliasArgument(O1Arg))
return NoAlias;
// Otherwise, nothing is known...
}
if (isa<Argument>(O2)) {
if (const Argument *O2Arg = dyn_cast<Argument>(O2)) {
// Incoming argument cannot alias locally allocated object!
if (isa<AllocationInst>(O1)) return NoAlias;
// If they are two different objects, and one is a noalias argument
// then they do not alias.
if (O1 != O2 && isNoAliasArgument(cast<Argument>(O2)))
if (O1 != O2 && isNoAliasArgument(O2Arg))
return NoAlias;
// Otherwise, nothing is known...