|
LLVM
5.0.0
|
#include "llvm/Analysis/AliasSetTracker.h"
Public Types | |
| typedef ilist< AliasSet >::iterator | iterator |
| typedef ilist< AliasSet > ::const_iterator | 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 () | |
| void | add (Value *Ptr, uint64_t 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 (MemSetInst *MSI) |
| void | add (MemTransferInst *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. More... | |
| AliasSet & | getAliasSetForPointer (Value *P, uint64_t Size, const AAMDNodes &AAInfo) |
| Return the alias set that the specified pointer lives in. More... | |
| AliasSet * | getAliasSetForPointerIfExists (const Value *P, uint64_t Size, const AAMDNodes &AAInfo) |
| Return the alias set containing the location specified if one exists, otherwise return null. More... | |
| bool | containsUnknown (const Instruction *I) const |
| Return true if the specified instruction "may" (or must) alias one of the members in any of the sets. 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 310 of file AliasSetTracker.h.
Definition at line 405 of file AliasSetTracker.h.
| typedef ilist<AliasSet>::iterator llvm::AliasSetTracker::iterator |
Definition at line 404 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 339 of file AliasSetTracker.h.
|
inline |
Definition at line 341 of file AliasSetTracker.h.
References clear().
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 339 of file AliasSetTracker.cpp.
Referenced by add(), and sinkLoopInvariantInstructions().
| void AliasSetTracker::add | ( | LoadInst * | LI | ) |
Definition at line 343 of file AliasSetTracker.cpp.
References addUnknown(), llvm::DL, llvm::Instruction::getAAMetadata(), llvm::Module::getDataLayout(), llvm::Instruction::getModule(), llvm::User::getOperand(), llvm::LoadInst::getOrdering(), llvm::Value::getType(), llvm::DataLayout::getTypeStoreSize(), llvm::isStrongerThanMonotonic(), and llvm::LoadInst::isVolatile().
| void AliasSetTracker::add | ( | StoreInst * | SI | ) |
Definition at line 356 of file AliasSetTracker.cpp.
References addUnknown(), llvm::DL, llvm::Instruction::getAAMetadata(), llvm::Module::getDataLayout(), llvm::Instruction::getModule(), llvm::User::getOperand(), llvm::StoreInst::getOrdering(), llvm::Value::getType(), llvm::DataLayout::getTypeStoreSize(), llvm::isStrongerThanMonotonic(), and llvm::StoreInst::isVolatile().
| void AliasSetTracker::add | ( | VAArgInst * | VAAI | ) |
Definition at line 370 of file AliasSetTracker.cpp.
References llvm::Instruction::getAAMetadata(), llvm::User::getOperand(), and llvm::MemoryLocation::UnknownSize.
| void AliasSetTracker::add | ( | MemSetInst * | MSI | ) |
Definition at line 378 of file AliasSetTracker.cpp.
References C, llvm::Instruction::getAAMetadata(), llvm::MemIntrinsic::getLength(), llvm::MemIntrinsic::getRawDest(), llvm::MemIntrinsic::isVolatile(), and llvm::MemoryLocation::UnknownSize.
| void AliasSetTracker::add | ( | MemTransferInst * | MTI | ) |
Definition at line 395 of file AliasSetTracker.cpp.
References C, llvm::Instruction::getAAMetadata(), llvm::MemIntrinsic::getLength(), llvm::MemIntrinsic::getRawDest(), llvm::MemTransferInst::getRawSource(), llvm::MemIntrinsic::isVolatile(), and llvm::MemoryLocation::UnknownSize.
| void AliasSetTracker::add | ( | Instruction * | I | ) |
Definition at line 444 of file AliasSetTracker.cpp.
References add(), addUnknown(), and SI.
| void AliasSetTracker::add | ( | BasicBlock & | BB | ) |
Definition at line 459 of file AliasSetTracker.cpp.
References add().
| void AliasSetTracker::add | ( | const AliasSetTracker & | AST | ) |
Definition at line 464 of file AliasSetTracker.cpp.
References add(), assert(), llvm::AliasSet::begin(), E, llvm::AliasSet::end(), and llvm::AliasSet::isVolatile().
| void AliasSetTracker::addUnknown | ( | Instruction * | I | ) |
Definition at line 416 of file AliasSetTracker.cpp.
References AliasSet, and llvm::Instruction::mayReadOrWriteMemory().
Referenced by add().
|
inline |
Definition at line 407 of file AliasSetTracker.h.
|
inline |
Definition at line 410 of file AliasSetTracker.h.
| void AliasSetTracker::clear | ( | ) |
Definition at line 237 of file AliasSetTracker.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::begin(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear(), E, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and I.
Referenced by ~AliasSetTracker().
| bool AliasSetTracker::containsUnknown | ( | const Instruction * | I | ) | const |
Return true if the specified instruction "may" (or must) alias one of the members in any of the sets.
Definition at line 271 of file AliasSetTracker.cpp.
References llvm::AliasSet::aliasesUnknownInst().
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 523 of file AliasSetTracker.cpp.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find_as().
Referenced by llvm::hoistRegion().
| 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 495 of file AliasSetTracker.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find_as().
Referenced by llvm::hoistRegion(), sink(), and llvm::sinkRegion().
| LLVM_DUMP_METHOD void AliasSetTracker::dump | ( | ) | const |
Definition at line 644 of file AliasSetTracker.cpp.
References llvm::dbgs(), and print().
|
inline |
Definition at line 408 of file AliasSetTracker.h.
|
inline |
Definition at line 411 of file AliasSetTracker.h.
|
inline |
Return the underlying alias analysis object used by this tracker.
Definition at line 390 of file AliasSetTracker.h.
Referenced by llvm::AliasSet::mergeSetIn().
| AliasSet & AliasSetTracker::getAliasSetForPointer | ( | Value * | Pointer, |
| uint64_t | Size, | ||
| const AAMDNodes & | AAInfo | ||
| ) |
Return the alias set that the specified pointer lives in.
getAliasSetForPointer - Return the alias set that the specified pointer lives in.
If the New argument is non-null, this method sets the value to true if a new alias set is created to contain the pointer (because the pointer didn't alias anything).
Definition at line 294 of file AliasSetTracker.cpp.
References AliasSet, and assert().
Referenced by pointerInvalidatedByLoop().
|
inline |
Return the alias set containing the location specified if one exists, otherwise return null.
Definition at line 380 of file AliasSetTracker.h.
Return the alias sets that are active.
Definition at line 369 of file AliasSetTracker.h.
| void AliasSetTracker::print | ( | raw_ostream & | OS | ) | const |
Definition at line 634 of file AliasSetTracker.cpp.
References llvm::AliasSet::print(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size().
Referenced by dump(), and llvm::operator<<().
|
friend |
Definition at line 417 of file AliasSetTracker.h.
Referenced by addUnknown(), and getAliasSetForPointer().
1.8.6