LLVM 23.0.0git
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)
bool pointsToConstantMemory (const Value *P, 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)
bool isNoAlias (const MemoryLocation &LocA, const MemoryLocation &LocB)
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.

Friends

class BatchAACrossIterationScope

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 657 of file AliasAnalysis.h.

Constructor & Destructor Documentation

◆ BatchAAResults() [1/2]

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

Definition at line 665 of file AliasAnalysis.h.

◆ BatchAAResults() [2/2]

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

Definition at line 666 of file AliasAnalysis.h.

Member Function Documentation

◆ alias()

◆ callCapturesBefore()

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

Definition at line 706 of file AliasAnalysis.h.

References I.

◆ disableDominatorTree()

void llvm::BatchAAResults::disableDominatorTree ( )
inline

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

Definition at line 718 of file AliasAnalysis.h.

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

◆ enableCrossIterationMode()

void llvm::BatchAAResults::enableCrossIterationMode ( )
inline

Assume that values may come from different cycle iterations.

Definition at line 713 of file AliasAnalysis.h.

Referenced by underlyingObjectsAlias().

◆ getArgModRefInfo()

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

Definition at line 689 of file AliasAnalysis.h.

References Call.

◆ getMemoryEffects()

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

Definition at line 692 of file AliasAnalysis.h.

References Call.

◆ getModRefInfo() [1/2]

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

Definition at line 686 of file AliasAnalysis.h.

References I.

◆ getModRefInfo() [2/2]

◆ 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

◆ isNoAlias()

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

Definition at line 703 of file AliasAnalysis.h.

References alias(), and llvm::AliasResult::NoAlias.

Referenced by hasLoopCarriedMemDep(), and underlyingObjectsAlias().

◆ pointsToConstantMemory() [1/2]

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

Definition at line 672 of file AliasAnalysis.h.

References llvm::isNoModRef().

Referenced by getMemcpyLoadsAndStores(), and pointsToConstantMemory().

◆ pointsToConstantMemory() [2/2]

bool llvm::BatchAAResults::pointsToConstantMemory ( const Value * P,
bool OrLocal = false )
inline

◆ BatchAACrossIterationScope

friend class BatchAACrossIterationScope
friend

Definition at line 662 of file AliasAnalysis.h.

References BatchAACrossIterationScope.

Referenced by BatchAACrossIterationScope.


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