Lines Matching full:as

44 void AliasSet::mergeSetIn(AliasSet &AS, AliasSetTracker &AST,  in mergeSetIn()  argument
46 assert(!AS.Forward && "Alias set is already forwarding!"); in mergeSetIn()
50 Access |= AS.Access; in mergeSetIn()
51 Alias |= AS.Alias; in mergeSetIn()
57 return any_of(AS.MemoryLocs, [&](const MemoryLocation &ASMemLoc) { in mergeSetIn()
66 std::swap(MemoryLocs, AS.MemoryLocs); in mergeSetIn()
68 append_range(MemoryLocs, AS.MemoryLocs); in mergeSetIn()
69 AS.MemoryLocs.clear(); in mergeSetIn()
72 bool ASHadUnknownInsts = !AS.UnknownInsts.empty(); in mergeSetIn()
75 std::swap(UnknownInsts, AS.UnknownInsts); in mergeSetIn()
79 llvm::append_range(UnknownInsts, AS.UnknownInsts); in mergeSetIn()
80 AS.UnknownInsts.clear(); in mergeSetIn()
83 AS.Forward = this; // Forward across AS now... in mergeSetIn()
84 addRef(); // AS is now pointing to us... in mergeSetIn()
87 AS.dropRef(AST); in mergeSetIn()
90 void AliasSetTracker::removeAliasSet(AliasSet *AS) { in removeAliasSet() argument
91 if (AliasSet *Fwd = AS->Forward) { in removeAliasSet()
93 AS->Forward = nullptr; in removeAliasSet()
95 TotalAliasSetSize -= AS->size(); in removeAliasSet()
97 AliasSets.erase(AS); in removeAliasSet()
100 if (AS == AliasAnyAS) { in removeAliasSet()
134 // Guards are marked as modifying memory for control flow modelling purposes, in addUnknownInst()
225 for (AliasSet &AS : llvm::make_early_inc_range(*this)) { in mergeAliasSetsForMemoryLocation()
226 if (AS.Forward) in mergeAliasSetsForMemoryLocation()
234 // NoAlias, while we treat it as MustAlias. in mergeAliasSetsForMemoryLocation()
235 if (&AS != PtrAS) { in mergeAliasSetsForMemoryLocation()
236 AliasResult AR = AS.aliasesMemoryLocation(MemLoc, AA); in mergeAliasSetsForMemoryLocation()
246 FoundSet = &AS; in mergeAliasSetsForMemoryLocation()
249 FoundSet->mergeSetIn(AS, *this, AA); in mergeAliasSetsForMemoryLocation()
258 for (AliasSet &AS : llvm::make_early_inc_range(*this)) { in findAliasSetForUnknownInst()
259 if (AS.Forward || !isModOrRefSet(AS.aliasesUnknownInst(Inst, AA))) in findAliasSetForUnknownInst()
263 FoundSet = &AS; in findAliasSetForUnknownInst()
266 FoundSet->mergeSetIn(AS, *this, AA); in findAliasSetForUnknownInst()
283 AliasSet *AS; in getAliasSetFor() local
291 AS = AliasAnyAS; in getAliasSetFor()
295 AS = AliasAS; in getAliasSetFor()
298 AliasSets.push_back(AS = new AliasSet()); in getAliasSetFor()
303 AS->addMemoryLocation(*this, MemLoc, MustAliasAll); in getAliasSetFor()
308 assert(MapEntry == AS && "Memory locations with same pointer value cannot " in getAliasSetFor()
311 AS->addRef(); in getAliasSetFor()
312 MapEntry = AS; in getAliasSetFor()
314 return *AS; in getAliasSetFor()
351 // These intrinsics will show up as affecting memory, but they are just in addUnknown()
369 if (AliasSet *AS = findAliasSetForUnknownInst(Inst)) { in addUnknown() local
370 AS->addUnknownInst(Inst, AA); in addUnknown()
406 // Some intrinsics are marked as modifying memory for control flow in add()
444 for (const AliasSet &AS : AST) { in add() local
445 if (AS.Forward) in add()
449 for (Instruction *Inst : AS.UnknownInsts) in add()
453 for (const MemoryLocation &ASMemLoc : AS.MemoryLocs) in add()
454 addMemoryLocation(ASMemLoc, (AliasSet::AccessLattice)AS.Access); in add()
467 for (AliasSet &AS : *this) in mergeAllAliasSets()
468 ASVector.push_back(&AS); in mergeAllAliasSets()
479 // If Cur was already forwarding, just forward to the new AS instead. in mergeAllAliasSets()
497 AliasSet &AS = getAliasSetFor(Loc); in addMemoryLocation() local
498 AS.Access |= E; in addMemoryLocation()
506 return AS; in addMemoryLocation()
559 for (const AliasSet &AS : *this) in print()
560 AS.print(OS); in print()