|
LLVM
10.0.0
|
#include "llvm/Analysis/AliasSetTracker.h"
Public Types | |
| using | iterator = ilist< AliasSet >::iterator |
| using | const_iterator = ilist< AliasSet >::const_iterator |
Public Member Functions | |
| AliasSetTracker (AliasAnalysis &aa) | |
| Create an empty collection of AliasSets, and use the specified alias analysis object to disambiguate load and store addresses. More... | |
| AliasSetTracker (AliasAnalysis &aa, MemorySSA *mssa, Loop *l) | |
| ~AliasSetTracker () | |
| void | add (Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo) |
| These methods are used to add different types of instructions to the alias sets. More... | |
| 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 | addAllInstructionsInLoopUsingMSSA () |
| void | clear () |
| const ilist< AliasSet > & | getAliasSets () const |
| Return the alias sets that are active. More... | |
| AliasSet & | getAliasSetFor (const MemoryLocation &MemLoc) |
| Return the alias set which contains the specified memory location. More... | |
| AliasAnalysis & | getAliasAnalysis () const |
| Return the underlying alias analysis object used by this tracker. More... | |
| void | deleteValue (Value *PtrVal) |
| This method is used to remove a pointer value from the AliasSetTracker entirely. More... | |
| void | copyValue (Value *From, Value *To) |
| This method should be used whenever a preexisting value in the program is copied or cloned, introducing a new value. More... | |
| 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 328 of file AliasSetTracker.h.
Definition at line 416 of file AliasSetTracker.h.
| using llvm::AliasSetTracker::iterator = ilist<AliasSet>::iterator |
Definition at line 415 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 360 of file AliasSetTracker.h.
|
inlineexplicit |
Definition at line 361 of file AliasSetTracker.h.
|
inline |
| 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 404 of file AliasSetTracker.cpp.
Referenced by isIgnorableInst(), and sinkLoopInvariantInstructions().
| void AliasSetTracker::add | ( | LoadInst * | LI | ) |
Definition at line 409 of file AliasSetTracker.cpp.
References llvm::MemoryLocation::get(), llvm::LoadInst::getOrdering(), and llvm::isStrongerThanMonotonic().
| void AliasSetTracker::add | ( | StoreInst * | SI | ) |
Definition at line 415 of file AliasSetTracker.cpp.
References llvm::MemoryLocation::get(), llvm::StoreInst::getOrdering(), and llvm::isStrongerThanMonotonic().
| void AliasSetTracker::add | ( | VAArgInst * | VAAI | ) |
Definition at line 421 of file AliasSetTracker.cpp.
References llvm::MemoryLocation::get().
| void AliasSetTracker::add | ( | AnyMemSetInst * | MSI | ) |
Definition at line 425 of file AliasSetTracker.cpp.
References llvm::MemoryLocation::getForDest().
| void AliasSetTracker::add | ( | AnyMemTransferInst * | MTI | ) |
Definition at line 429 of file AliasSetTracker.cpp.
References llvm::MemoryLocation::getForDest(), and llvm::MemoryLocation::getForSource().
| void AliasSetTracker::add | ( | Instruction * | I | ) |
Definition at line 461 of file AliasSetTracker.cpp.
References add(), Arg, llvm::clearMod(), llvm::createModRefInfo(), llvm::enumerate(), llvm::AAResults::getArgModRefInfo(), llvm::MemoryLocation::getForArgument(), llvm::AAResults::getModRefBehavior(), llvm::Value::getType(), llvm::intersectModRef(), llvm::isModSet(), llvm::isNoModRef(), llvm::Type::isPointerTy(), llvm::isRefSet(), llvm::PatternMatch::match(), MRI, and SI.
| void AliasSetTracker::add | ( | BasicBlock & | BB | ) |
Definition at line 516 of file AliasSetTracker.cpp.
References add().
| void AliasSetTracker::add | ( | const AliasSetTracker & | AST | ) |
Definition at line 521 of file AliasSetTracker.cpp.
References add(), assert(), llvm::AliasSet::begin(), llvm::numbers::e, E, and llvm::AliasSet::end().
| void AliasSetTracker::addAllInstructionsInLoopUsingMSSA | ( | ) |
Definition at line 545 of file AliasSetTracker.cpp.
| void AliasSetTracker::addUnknown | ( | Instruction * | I | ) |
Definition at line 434 of file AliasSetTracker.cpp.
References llvm::Instruction::mayReadOrWriteMemory().
|
inline |
Definition at line 418 of file AliasSetTracker.h.
Referenced by llvm::canSinkOrHoistInst().
|
inline |
Definition at line 421 of file AliasSetTracker.h.
| void AliasSetTracker::clear | ( | ) |
Definition at line 289 of file AliasSetTracker.cpp.
References llvm::AliasSet::begin(), E, llvm::AliasSet::end(), I, llvm::AliasSet::mergeSetIn(), llvm::MustAlias, and llvm::NoAlias.
This method should be used whenever a preexisting value in the program is copied or cloned, introducing a new value.
Note that it is ok for clients that use this method to introduce the same value multiple times: if the tracker already knows about a value, it will ignore the request.
Definition at line 587 of file AliasSetTracker.cpp.
References assert(), llvm::AliasSet::begin(), E, llvm::AliasSet::end(), and SaturationThreshold.
Referenced by dump(), llvm::hoistRegion(), and isSafeToExecuteUnconditionally().
| void AliasSetTracker::deleteValue | ( | Value * | PtrVal | ) |
This method is used to remove a pointer value from the AliasSetTracker entirely.
It should be used when an instruction is deleted from the program to update the AST. If you don't use this, you would have dangling pointers to deleted instructions.
Definition at line 559 of file AliasSetTracker.cpp.
Referenced by dump(), eraseInstruction(), and isSafeToExecuteUnconditionally().
| LLVM_DUMP_METHOD void AliasSetTracker::dump | ( | ) | const |
Definition at line 711 of file AliasSetTracker.cpp.
References llvm::AnalysisUsage::addRequired(), llvm::AliasSet::AliasSetTracker, assert(), copyValue(), llvm::dbgs(), deleteValue(), E, llvm::errs(), F(), llvm::Value::getName(), llvm::PassRegistry::getPassRegistry(), I, INITIALIZE_PASS_BEGIN(), INITIALIZE_PASS_DEPENDENCY, llvm::initializeAliasSetPrinterPass(), llvm::inst_begin(), llvm::inst_end(), llvm::AliasSet::print(), runOnFunction(), and llvm::AnalysisUsage::setPreservesAll().
|
inline |
Definition at line 419 of file AliasSetTracker.h.
Referenced by llvm::canSinkOrHoistInst().
|
inline |
Definition at line 422 of file AliasSetTracker.h.
References llvm::AliasSet::dump(), and llvm::AliasSet::print().
|
inline |
Return the underlying alias analysis object used by this tracker.
Definition at line 401 of file AliasSetTracker.h.
References From.
Referenced by llvm::AliasSet::mergeSetIn().
| 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 353 of file AliasSetTracker.cpp.
References llvm::MemoryLocation::AATags, assert(), llvm::MemoryLocation::Ptr, and llvm::MemoryLocation::Size.
Referenced by llvm::canSinkOrHoistInst(), and pointerInvalidatedByLoop().
Return the alias sets that are active.
Definition at line 392 of file AliasSetTracker.h.
| void AliasSetTracker::print | ( | raw_ostream & | OS | ) | const |
Definition at line 699 of file AliasSetTracker.cpp.
References llvm::AliasSet::print().
Referenced by llvm::operator<<().
|
friend |
Definition at line 428 of file AliasSetTracker.h.
1.8.13