mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
use the new isNoAlias method to simplify some code, only do an escaping check if
we have a non-constant pointer. Constant pointers can't be local. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89665 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -127,17 +127,18 @@ AliasAnalysis::getModRefBehavior(Function *F,
|
||||
|
||||
AliasAnalysis::ModRefResult
|
||||
AliasAnalysis::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
|
||||
ModRefResult Mask = ModRef;
|
||||
ModRefBehavior MRB = getModRefBehavior(CS);
|
||||
if (MRB == DoesNotAccessMemory)
|
||||
return NoModRef;
|
||||
else if (MRB == OnlyReadsMemory)
|
||||
|
||||
ModRefResult Mask = ModRef;
|
||||
if (MRB == OnlyReadsMemory)
|
||||
Mask = Ref;
|
||||
else if (MRB == AliasAnalysis::AccessesArguments) {
|
||||
bool doesAlias = false;
|
||||
for (CallSite::arg_iterator AI = CS.arg_begin(), AE = CS.arg_end();
|
||||
AI != AE; ++AI)
|
||||
if (alias(*AI, ~0U, P, Size) != NoAlias) {
|
||||
if (!isNoAlias(*AI, ~0U, P, Size)) {
|
||||
doesAlias = true;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user