LLVM 22.0.0git
llvm::AliasSetTracker Class Reference

#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 ()
LLVM_ABI void add (const MemoryLocation &Loc)
 These methods are used to add different types of instructions to the alias sets.
LLVM_ABI void add (LoadInst *LI)
LLVM_ABI void add (StoreInst *SI)
LLVM_ABI void add (VAArgInst *VAAI)
LLVM_ABI void add (AnyMemSetInst *MSI)
LLVM_ABI void add (AnyMemTransferInst *MTI)
LLVM_ABI void add (Instruction *I)
LLVM_ABI void add (BasicBlock &BB)
LLVM_ABI void add (const AliasSetTracker &AST)
LLVM_ABI void addUnknown (Instruction *I)
LLVM_ABI void clear ()
const ilist< AliasSet > & getAliasSets () const
 Return the alias sets that are active.
LLVM_ABI AliasSetgetAliasSetFor (const MemoryLocation &MemLoc)
 Return the alias set which contains the specified memory location.
BatchAAResultsgetAliasAnalysis () const
 Return the underlying alias analysis object used by this tracker.
const_iterator begin () const
const_iterator end () const
iterator begin ()
iterator end ()
LLVM_ABI void print (raw_ostream &OS) const
LLVM_ABI void dump () const

Friends

class AliasSet

Detailed Description

Definition at line 163 of file AliasSetTracker.h.

Member Typedef Documentation

◆ const_iterator

◆ iterator

Definition at line 215 of file AliasSetTracker.h.

Constructor & Destructor Documentation

◆ AliasSetTracker()

llvm::AliasSetTracker::AliasSetTracker ( BatchAAResults & AA)
inlineexplicit

Create an empty collection of AliasSets, and use the specified alias analysis object to disambiguate load and store addresses.

Definition at line 176 of file AliasSetTracker.h.

Referenced by add().

◆ ~AliasSetTracker()

llvm::AliasSetTracker::~AliasSetTracker ( )
inline

Definition at line 177 of file AliasSetTracker.h.

References clear().

Member Function Documentation

◆ add() [1/9]

void AliasSetTracker::add ( AnyMemSetInst * MSI)

Definition at line 336 of file AliasSetTracker.cpp.

References llvm::MemoryLocation::getForDest().

◆ add() [2/9]

void AliasSetTracker::add ( AnyMemTransferInst * MTI)

◆ add() [3/9]

void AliasSetTracker::add ( BasicBlock & BB)

Definition at line 428 of file AliasSetTracker.cpp.

References add(), and I.

◆ add() [4/9]

void AliasSetTracker::add ( const AliasSetTracker & AST)

Definition at line 433 of file AliasSetTracker.cpp.

References add(), AliasSet, AliasSetTracker(), and assert().

◆ add() [5/9]

void AliasSetTracker::add ( const MemoryLocation & Loc)

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:

  1. If the instruction doesn't alias any other sets, create a new set.
  2. If the instruction aliases exactly one set, add it to the set
  3. If the instruction aliases multiple sets, merge the sets, and add the instruction to the result.

Definition at line 316 of file AliasSetTracker.cpp.

Referenced by add(), add(), add(), collectPromotionCandidates(), and llvm::AliasSetsPrinterPass::run().

◆ add() [6/9]

◆ add() [7/9]

void AliasSetTracker::add ( LoadInst * LI)

◆ add() [8/9]

void AliasSetTracker::add ( StoreInst * SI)

◆ add() [9/9]

void AliasSetTracker::add ( VAArgInst * VAAI)

Definition at line 332 of file AliasSetTracker.cpp.

References llvm::MemoryLocation::get().

◆ addUnknown()

void AliasSetTracker::addUnknown ( Instruction * I)

Definition at line 345 of file AliasSetTracker.cpp.

References AliasSet, llvm::dyn_cast(), II, and llvm::Instruction::mayReadOrWriteMemory().

Referenced by add(), add(), and add().

◆ begin() [1/2]

iterator llvm::AliasSetTracker::begin ( )
inline

Definition at line 221 of file AliasSetTracker.h.

◆ begin() [2/2]

const_iterator llvm::AliasSetTracker::begin ( ) const
inline

Definition at line 218 of file AliasSetTracker.h.

◆ clear()

void AliasSetTracker::clear ( )

Definition at line 209 of file AliasSetTracker.cpp.

References llvm::SmallVectorImpl< T >::clear().

Referenced by ~AliasSetTracker().

◆ dump()

LLVM_DUMP_METHOD void AliasSetTracker::dump ( ) const

Definition at line 562 of file AliasSetTracker.cpp.

References llvm::dbgs(), LLVM_DUMP_METHOD, and print().

◆ end() [1/2]

iterator llvm::AliasSetTracker::end ( )
inline

Definition at line 222 of file AliasSetTracker.h.

◆ end() [2/2]

const_iterator llvm::AliasSetTracker::end ( ) const
inline

Definition at line 219 of file AliasSetTracker.h.

◆ getAliasAnalysis()

BatchAAResults & llvm::AliasSetTracker::getAliasAnalysis ( ) const
inline

Return the underlying alias analysis object used by this tracker.

Definition at line 213 of file AliasSetTracker.h.

◆ getAliasSetFor()

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 271 of file AliasSetTracker.cpp.

References AliasSet, assert(), llvm::is_contained(), and llvm::MemoryLocation::Ptr.

◆ getAliasSets()

const ilist< AliasSet > & llvm::AliasSetTracker::getAliasSets ( ) const
inline

Return the alias sets that are active.

Definition at line 204 of file AliasSetTracker.h.

◆ print()

void AliasSetTracker::print ( raw_ostream & OS) const

Definition at line 550 of file AliasSetTracker.cpp.

References AliasSet, and llvm::AliasSet::print().

Referenced by dump(), llvm::operator<<(), and llvm::AliasSetsPrinterPass::run().

◆ AliasSet

friend class AliasSet
friend

Definition at line 228 of file AliasSetTracker.h.

References AliasSet.

Referenced by add(), addUnknown(), AliasSet, getAliasSetFor(), and print().


The documentation for this class was generated from the following files: