LLVM 20.0.0git
Public Member Functions | List of all members
llvm::BatchAAResults Class Reference

This class is a wrapper over an AAResults, and it is intended to be used only when there are no IR changes inbetween queries. More...

#include "llvm/Analysis/AliasAnalysis.h"

Public Member Functions

 BatchAAResults (AAResults &AAR)
 
 BatchAAResults (AAResults &AAR, CaptureAnalysis *CA)
 
AliasResult alias (const MemoryLocation &LocA, const MemoryLocation &LocB)
 
bool pointsToConstantMemory (const MemoryLocation &Loc, bool OrLocal=false)
 
ModRefInfo getModRefInfoMask (const MemoryLocation &Loc, bool IgnoreLocals=false)
 
ModRefInfo getModRefInfo (const Instruction *I, const std::optional< MemoryLocation > &OptLoc)
 
ModRefInfo getModRefInfo (const Instruction *I, const CallBase *Call2)
 
ModRefInfo getArgModRefInfo (const CallBase *Call, unsigned ArgIdx)
 
MemoryEffects getMemoryEffects (const CallBase *Call)
 
bool isMustAlias (const MemoryLocation &LocA, const MemoryLocation &LocB)
 
bool isMustAlias (const Value *V1, const Value *V2)
 
ModRefInfo callCapturesBefore (const Instruction *I, const MemoryLocation &MemLoc, DominatorTree *DT)
 
void enableCrossIterationMode ()
 Assume that values may come from different cycle iterations.
 
void disableDominatorTree ()
 Disable the use of the dominator tree during alias analysis queries.
 

Detailed Description

This class is a wrapper over an AAResults, and it is intended to be used only when there are no IR changes inbetween queries.

BatchAAResults is reusing the same AAQueryInfo to preserve the state across queries, esentially making AA work in "batch mode". The internal state cannot be cleared, so to go "out-of-batch-mode", the user must either use AAResults, or create a new BatchAAResults.

Definition at line 630 of file AliasAnalysis.h.

Constructor & Destructor Documentation

◆ BatchAAResults() [1/2]

llvm::BatchAAResults::BatchAAResults ( AAResults AAR)
inline

Definition at line 636 of file AliasAnalysis.h.

◆ BatchAAResults() [2/2]

llvm::BatchAAResults::BatchAAResults ( AAResults AAR,
CaptureAnalysis CA 
)
inline

Definition at line 637 of file AliasAnalysis.h.

Member Function Documentation

◆ alias()

AliasResult llvm::BatchAAResults::alias ( const MemoryLocation LocA,
const MemoryLocation LocB 
)
inline

◆ callCapturesBefore()

ModRefInfo llvm::BatchAAResults::callCapturesBefore ( const Instruction I,
const MemoryLocation MemLoc,
DominatorTree DT 
)
inline

Definition at line 671 of file AliasAnalysis.h.

References llvm::AAResults::callCapturesBefore(), and I.

◆ disableDominatorTree()

void llvm::BatchAAResults::disableDominatorTree ( )
inline

Disable the use of the dominator tree during alias analysis queries.

Definition at line 683 of file AliasAnalysis.h.

References llvm::AAQueryInfo::UseDominatorTree.

Referenced by llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad().

◆ enableCrossIterationMode()

void llvm::BatchAAResults::enableCrossIterationMode ( )
inline

Assume that values may come from different cycle iterations.

Definition at line 678 of file AliasAnalysis.h.

References llvm::AAQueryInfo::MayBeCrossIteration.

◆ getArgModRefInfo()

ModRefInfo llvm::BatchAAResults::getArgModRefInfo ( const CallBase Call,
unsigned  ArgIdx 
)
inline

Definition at line 657 of file AliasAnalysis.h.

References llvm::AAResults::getArgModRefInfo().

Referenced by llvm::AliasSetTracker::add().

◆ getMemoryEffects()

MemoryEffects llvm::BatchAAResults::getMemoryEffects ( const CallBase Call)
inline

Definition at line 660 of file AliasAnalysis.h.

References llvm::AAResults::getMemoryEffects().

Referenced by llvm::AliasSetTracker::add().

◆ getModRefInfo() [1/2]

ModRefInfo llvm::BatchAAResults::getModRefInfo ( const Instruction I,
const CallBase Call2 
)
inline

Definition at line 654 of file AliasAnalysis.h.

References llvm::AAResults::getModRefInfo(), and I.

◆ getModRefInfo() [2/2]

ModRefInfo llvm::BatchAAResults::getModRefInfo ( const Instruction I,
const std::optional< MemoryLocation > &  OptLoc 
)
inline

◆ getModRefInfoMask()

ModRefInfo llvm::BatchAAResults::getModRefInfoMask ( const MemoryLocation Loc,
bool  IgnoreLocals = false 
)
inline

◆ isMustAlias() [1/2]

bool llvm::BatchAAResults::isMustAlias ( const MemoryLocation LocA,
const MemoryLocation LocB 
)
inline

◆ isMustAlias() [2/2]

bool llvm::BatchAAResults::isMustAlias ( const Value V1,
const Value V2 
)
inline

◆ pointsToConstantMemory()

bool llvm::BatchAAResults::pointsToConstantMemory ( const MemoryLocation Loc,
bool  OrLocal = false 
)
inline

Definition at line 643 of file AliasAnalysis.h.

References llvm::AAResults::getModRefInfoMask(), and llvm::isNoModRef().


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