mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Seriously strengthen the guarantee offered by noalias on a function's return
value. It must now be as if the pointer were allocated and has not escaped to the caller. Thanks to Dan Gohman for pointing out the error in the original and helping devise this definition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59940 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -383,9 +383,9 @@ BasicAliasAnalysis::alias(const Value *V1, unsigned V1Size,
|
||||
if (isIdentifiedObject(O1) && isIdentifiedObject(O2))
|
||||
return NoAlias;
|
||||
|
||||
// Local allocations can't alias with arguments or noalias functions.
|
||||
if ((isa<AllocationInst>(O1) && (isa<Argument>(O2) || isNoAliasCall(O2))) ||
|
||||
(isa<AllocationInst>(O2) && (isa<Argument>(O1) || isNoAliasCall(O1))))
|
||||
// Arguments can't alias with local allocations or noalias calls.
|
||||
if ((isa<Argument>(O1) && (isa<AllocationInst>(O2) || isNoAliasCall(O2))) ||
|
||||
(isa<Argument>(O2) && (isa<AllocationInst>(O1) || isNoAliasCall(O1))))
|
||||
return NoAlias;
|
||||
|
||||
// Most objects can't alias null.
|
||||
|
Reference in New Issue
Block a user