LLVM 18.0.0git
|
#include "llvm/Analysis/AliasSetTracker.h"
Public Types | |
using | iterator = ilist< AliasSet >::iterator |
using | const_iterator = ilist< AliasSet >::const_iterator |
Public Member Functions | |
AliasSetTracker (BatchAAResults &AA) | |
Create an empty collection of AliasSets, and use the specified alias analysis object to disambiguate load and store addresses. | |
~AliasSetTracker () | |
void | add (Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo) |
These methods are used to add different types of instructions to the alias sets. | |
void | add (LoadInst *LI) |
void | add (StoreInst *SI) |
void | add (VAArgInst *VAAI) |
void | add (AnyMemSetInst *MSI) |
void | add (AnyMemTransferInst *MTI) |
void | add (Instruction *I) |
void | add (BasicBlock &BB) |
void | add (const AliasSetTracker &AST) |
void | addUnknown (Instruction *I) |
void | clear () |
const ilist< AliasSet > & | getAliasSets () const |
Return the alias sets that are active. | |
AliasSet & | getAliasSetFor (const MemoryLocation &MemLoc) |
Return the alias set which contains the specified memory location. | |
BatchAAResults & | getAliasAnalysis () const |
Return the underlying alias analysis object used by this tracker. | |
const_iterator | begin () const |
const_iterator | end () const |
iterator | begin () |
iterator | end () |
void | print (raw_ostream &OS) const |
void | dump () const |
Friends | |
class | AliasSet |
Definition at line 306 of file AliasSetTracker.h.
Definition at line 359 of file AliasSetTracker.h.
using llvm::AliasSetTracker::iterator = ilist<AliasSet>::iterator |
Definition at line 358 of file AliasSetTracker.h.
|
inlineexplicit |
Create an empty collection of AliasSets, and use the specified alias analysis object to disambiguate load and store addresses.
Definition at line 318 of file AliasSetTracker.h.
|
inline |
Definition at line 319 of file AliasSetTracker.h.
References clear().
void AliasSetTracker::add | ( | AnyMemSetInst * | MSI | ) |
Definition at line 391 of file AliasSetTracker.cpp.
References llvm::MemoryLocation::getForDest().
void AliasSetTracker::add | ( | AnyMemTransferInst * | MTI | ) |
Definition at line 395 of file AliasSetTracker.cpp.
References llvm::MemoryLocation::getForDest(), and llvm::MemoryLocation::getForSource().
void AliasSetTracker::add | ( | BasicBlock & | BB | ) |
Definition at line 484 of file AliasSetTracker.cpp.
void AliasSetTracker::add | ( | const AliasSetTracker & | AST | ) |
Definition at line 489 of file AliasSetTracker.cpp.
References add(), assert(), llvm::AliasSet::begin(), E, and llvm::AliasSet::end().
void AliasSetTracker::add | ( | Instruction * | I | ) |
Definition at line 429 of file AliasSetTracker.cpp.
References add(), addUnknown(), llvm::enumerate(), llvm::BatchAAResults::getArgModRefInfo(), llvm::MemoryLocation::getForArgument(), llvm::BatchAAResults::getMemoryEffects(), llvm::MemoryEffectsBase< LocationEnum >::getModRef(), llvm::Value::getType(), I, llvm::isModSet(), llvm::isNoModRef(), llvm::Type::isPointerTy(), llvm::isRefSet(), llvm::PatternMatch::match(), MRI, and llvm::Ref.
void AliasSetTracker::add | ( | LoadInst * | LI | ) |
Definition at line 375 of file AliasSetTracker.cpp.
References addUnknown(), llvm::MemoryLocation::get(), llvm::LoadInst::getOrdering(), and llvm::isStrongerThanMonotonic().
void AliasSetTracker::add | ( | StoreInst * | SI | ) |
Definition at line 381 of file AliasSetTracker.cpp.
References addUnknown(), llvm::MemoryLocation::get(), and llvm::isStrongerThanMonotonic().
void AliasSetTracker::add | ( | VAArgInst * | VAAI | ) |
Definition at line 387 of file AliasSetTracker.cpp.
References llvm::MemoryLocation::get().
void AliasSetTracker::add | ( | Value * | Ptr, |
LocationSize | Size, | ||
const AAMDNodes & | AAInfo | ||
) |
These methods are used to add different types of instructions to the alias sets.
Adding a new instruction can result in one of three actions happening:
These methods return true if inserting the instruction resulted in the addition of a new alias set (i.e., the pointer did not alias anything).
Definition at line 370 of file AliasSetTracker.cpp.
Referenced by add(), collectPromotionCandidates(), and llvm::AliasSetsPrinterPass::run().
void AliasSetTracker::addUnknown | ( | Instruction * | I | ) |
Definition at line 400 of file AliasSetTracker.cpp.
References AliasSet, and llvm::Instruction::mayReadOrWriteMemory().
Referenced by add().
|
inline |
Definition at line 364 of file AliasSetTracker.h.
|
inline |
Definition at line 361 of file AliasSetTracker.h.
void AliasSetTracker::clear | ( | ) |
LLVM_DUMP_METHOD void AliasSetTracker::dump | ( | ) | const |
Definition at line 619 of file AliasSetTracker.cpp.
References llvm::dbgs(), and print().
|
inline |
Definition at line 365 of file AliasSetTracker.h.
|
inline |
Definition at line 362 of file AliasSetTracker.h.
|
inline |
Return the underlying alias analysis object used by this tracker.
Definition at line 356 of file AliasSetTracker.h.
AliasSet & AliasSetTracker::getAliasSetFor | ( | const MemoryLocation & | MemLoc | ) |
Return the alias set which contains the specified memory location.
If the memory location aliases two or more existing alias sets, will have the effect of merging those alias sets before the single resulting alias set is returned.
Definition at line 319 of file AliasSetTracker.cpp.
References llvm::MemoryLocation::AATags, AliasSet, assert(), llvm::MemoryLocation::Ptr, llvm::MemoryLocation::Size, and Size.
Return the alias sets that are active.
Definition at line 347 of file AliasSetTracker.h.
void AliasSetTracker::print | ( | raw_ostream & | OS | ) | const |
Definition at line 607 of file AliasSetTracker.cpp.
References OS, llvm::AliasSet::print(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size().
Referenced by dump(), llvm::operator<<(), and llvm::AliasSetsPrinterPass::run().
|
friend |
Definition at line 371 of file AliasSetTracker.h.
Referenced by addUnknown(), and getAliasSetFor().