class AliasSetTracker

Declaration

class AliasSetTracker { /* full declaration omitted */ };

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:322

Member Variables

private llvm::AAResults& AA
private ilist<llvm::AliasSet> AliasSets
private llvm::AliasSetTracker::PointerMapType PointerMap
private unsigned int TotalMayAliasSetSize = 0
private llvm::AliasSet* AliasAnyAS = nullptr

Method Overview

  • public AliasSetTracker(llvm::AAResults & AA)
  • public void add(llvm::Value * Ptr, llvm::LocationSize Size, const llvm::AAMDNodes & AAInfo)
  • public void add(llvm::LoadInst * LI)
  • public void add(llvm::StoreInst * SI)
  • public void add(llvm::VAArgInst * VAAI)
  • public void add(llvm::AnyMemSetInst * MSI)
  • public void add(llvm::AnyMemTransferInst * MTI)
  • public void add(llvm::Instruction * I)
  • public void add(llvm::BasicBlock & BB)
  • public void add(const llvm::AliasSetTracker & AST)
  • private llvm::AliasSet & addPointer(llvm::MemoryLocation Loc, AliasSet::AccessLattice E)
  • public void addUnknown(llvm::Instruction * I)
  • public llvm::AliasSetTracker::const_iterator begin() const
  • public llvm::AliasSetTracker::iterator begin()
  • public void clear()
  • public void copyValue(llvm::Value * From, llvm::Value * To)
  • public void deleteValue(llvm::Value * PtrVal)
  • public void dump() const
  • public llvm::AliasSetTracker::iterator end()
  • public llvm::AliasSetTracker::const_iterator end() const
  • private llvm::AliasSet * findAliasSetForUnknownInst(llvm::Instruction * Inst)
  • public llvm::AAResults & getAliasAnalysis() const
  • public llvm::AliasSet & getAliasSetFor(const llvm::MemoryLocation & MemLoc)
  • public const ilist<llvm::AliasSet> & getAliasSets() const
  • private AliasSet::PointerRec & getEntryFor(llvm::Value * V)
  • private llvm::AliasSet * mergeAliasSetsForPointer(const llvm::Value * Ptr, llvm::LocationSize Size, const llvm::AAMDNodes & AAInfo, bool & MustAliasAll)
  • private llvm::AliasSet & mergeAllAliasSets()
  • public void print(llvm::raw_ostream & OS) const
  • private void removeAliasSet(llvm::AliasSet * AS)
  • public ~AliasSetTracker()

Methods

AliasSetTracker(llvm::AAResults& AA)

Description

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

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:352

Parameters

llvm::AAResults& AA

void add(llvm::Value* Ptr,
         llvm::LocationSize Size,
         const llvm::AAMDNodes& AAInfo)

Description

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. 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).

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:367

Parameters

llvm::Value* Ptr
llvm::LocationSize Size
const llvm::AAMDNodes& AAInfo

void add(llvm::LoadInst* LI)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:368

Parameters

llvm::LoadInst* LI

void add(llvm::StoreInst* SI)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:369

Parameters

llvm::StoreInst* SI

void add(llvm::VAArgInst* VAAI)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:370

Parameters

llvm::VAArgInst* VAAI

void add(llvm::AnyMemSetInst* MSI)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:371

Parameters

llvm::AnyMemSetInst* MSI

void add(llvm::AnyMemTransferInst* MTI)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:372

Parameters

llvm::AnyMemTransferInst* MTI

void add(llvm::Instruction* I)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:373

Parameters

llvm::Instruction* I

void add(llvm::BasicBlock& BB)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:374

Parameters

llvm::BasicBlock& BB

void add(const llvm::AliasSetTracker& AST)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:375

Parameters

const llvm::AliasSetTracker& AST

llvm::AliasSet& addPointer(
    llvm::MemoryLocation Loc,
    AliasSet::AccessLattice E)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:437

Parameters

llvm::MemoryLocation Loc
AliasSet::AccessLattice E

void addUnknown(llvm::Instruction* I)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:376

Parameters

llvm::Instruction* I

llvm::AliasSetTracker::const_iterator begin()
    const

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:407

llvm::AliasSetTracker::iterator begin()

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:410

void clear()

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:378

void copyValue(llvm::Value* From, llvm::Value* To)

Description

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.

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:402

Parameters

llvm::Value* From
llvm::Value* To

void deleteValue(llvm::Value* PtrVal)

Description

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.

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:396

Parameters

llvm::Value* PtrVal

void dump() const

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:414

llvm::AliasSetTracker::iterator end()

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:411

llvm::AliasSetTracker::const_iterator end() const

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:408

llvm::AliasSet* findAliasSetForUnknownInst(
    llvm::Instruction* Inst)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:446

Parameters

llvm::Instruction* Inst

llvm::AAResults& getAliasAnalysis() const

Description

Return the underlying alias analysis object used by this tracker.

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:390

llvm::AliasSet& getAliasSetFor(
    const llvm::MemoryLocation& MemLoc)

Description

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.

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:387

Parameters

const llvm::MemoryLocation& MemLoc

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

Description

Return the alias sets that are active.

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:381

AliasSet::PointerRec& getEntryFor(llvm::Value* V)

Description

Just like operator[] on the map, except that it creates an entry for the pointer if it doesn't already exist.

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:430

Parameters

llvm::Value* V

llvm::AliasSet* mergeAliasSetsForPointer(
    const llvm::Value* Ptr,
    llvm::LocationSize Size,
    const llvm::AAMDNodes& AAInfo,
    bool& MustAliasAll)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:438

Parameters

const llvm::Value* Ptr
llvm::LocationSize Size
const llvm::AAMDNodes& AAInfo
bool& MustAliasAll

llvm::AliasSet& mergeAllAliasSets()

Description

Merge all alias sets into a single set that is considered to alias any pointer.

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:444

void print(llvm::raw_ostream& OS) const

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:413

Parameters

llvm::raw_ostream& OS

void removeAliasSet(llvm::AliasSet* AS)

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:426

Parameters

llvm::AliasSet* AS

~AliasSetTracker()

Declared at: llvm/include/llvm/Analysis/AliasSetTracker.h:353