Lines Matching full:as

43 void AliasSet::mergeSetIn(AliasSet &AS, AliasSetTracker &AST,
45 assert(!AS.Forward && "Alias set is already forwarding!");
49 Access |= AS.Access;
50 Alias |= AS.Alias;
56 return any_of(AS.MemoryLocs, [&](const MemoryLocation &ASMemLoc) {
65 std::swap(MemoryLocs, AS.MemoryLocs);
67 append_range(MemoryLocs, AS.MemoryLocs);
68 AS.MemoryLocs.clear();
71 bool ASHadUnknownInsts = !AS.UnknownInsts.empty();
74 std::swap(UnknownInsts, AS.UnknownInsts);
78 llvm::append_range(UnknownInsts, AS.UnknownInsts);
79 AS.UnknownInsts.clear();
82 AS.Forward = this; // Forward across AS now...
83 addRef(); // AS is now pointing to us...
86 AS.dropRef(AST);
89 void AliasSetTracker::removeAliasSet(AliasSet *AS) {
90 if (AliasSet *Fwd = AS->Forward) {
92 AS->Forward = nullptr;
94 TotalAliasSetSize -= AS->size();
96 AliasSets.erase(AS);
99 if (AS == AliasAnyAS) {
133 // Guards are marked as modifying memory for control flow modelling purposes,
224 for (AliasSet &AS : llvm::make_early_inc_range(*this)) {
225 if (AS.Forward)
233 // NoAlias, while we treat it as MustAlias.
234 if (&AS != PtrAS) {
235 AliasResult AR = AS.aliasesMemoryLocation(MemLoc, AA);
245 FoundSet = &AS;
248 FoundSet->mergeSetIn(AS, *this, AA);
257 for (AliasSet &AS : llvm::make_early_inc_range(*this)) {
258 if (AS.Forward || !isModOrRefSet(AS.aliasesUnknownInst(Inst, AA)))
262 FoundSet = &AS;
265 FoundSet->mergeSetIn(AS, *this, AA);
282 AliasSet *AS;
290 AS = AliasAnyAS;
294 AS = AliasAS;
297 AliasSets.push_back(AS = new AliasSet());
302 AS->addMemoryLocation(*this, MemLoc, MustAliasAll);
307 assert(MapEntry == AS && "Memory locations with same pointer value cannot "
310 AS->addRef();
311 MapEntry = AS;
313 return *AS;
350 // These intrinsics will show up as affecting memory, but they are just
368 if (AliasSet *AS = findAliasSetForUnknownInst(Inst)) {
369 AS->addUnknownInst(Inst, AA);
405 // Some intrinsics are marked as modifying memory for control flow
443 for (const AliasSet &AS : AST) {
444 if (AS.Forward)
448 for (Instruction *Inst : AS.UnknownInsts)
452 for (const MemoryLocation &ASMemLoc : AS.MemoryLocs)
453 addMemoryLocation(ASMemLoc, (AliasSet::AccessLattice)AS.Access);
466 for (AliasSet &AS : *this)
467 ASVector.push_back(&AS);
478 // If Cur was already forwarding, just forward to the new AS instead.
496 AliasSet &AS = getAliasSetFor(Loc);
497 AS.Access |= E;
505 return AS;
558 for (const AliasSet &AS : *this)
559 AS.print(OS);