Lines Matching full:as

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