LLVM 20.0.0git
Classes | Functions
llvm::GISelAddressing Namespace Reference

Classes

class  BaseIndexOffset
 Helper struct to store a base, index and offset that forms an address. More...
 

Functions

BaseIndexOffset getPointerInfo (Register Ptr, MachineRegisterInfo &MRI)
 Returns a BaseIndexOffset which describes the pointer in Ptr.
 
bool aliasIsKnownForLoadStore (const MachineInstr &MI1, const MachineInstr &MI2, bool &IsAlias, MachineRegisterInfo &MRI)
 Compute whether or not a memory access at MI1 aliases with an access at MI2.
 
bool instMayAlias (const MachineInstr &MI, const MachineInstr &Other, MachineRegisterInfo &MRI, AliasAnalysis *AA)
 Returns true if the instruction MI may alias Other.
 

Function Documentation

◆ aliasIsKnownForLoadStore()

bool llvm::GISelAddressing::aliasIsKnownForLoadStore ( const MachineInstr MI1,
const MachineInstr MI2,
bool IsAlias,
MachineRegisterInfo MRI 
)

◆ getPointerInfo()

BaseIndexOffset llvm::GISelAddressing::getPointerInfo ( Register  Ptr,
MachineRegisterInfo MRI 
)

◆ instMayAlias()

bool llvm::GISelAddressing::instMayAlias ( const MachineInstr MI,
const MachineInstr Other,
MachineRegisterInfo MRI,
AliasAnalysis AA 
)

Returns true if the instruction MI may alias Other.

This function uses multiple strategies to detect aliasing, whereas aliasIsKnownForLoadStore just looks at the addresses of load/stores and is tries to reason about base/index/offsets.

Definition at line 188 of file LoadStoreOpt.cpp.

References aliasIsKnownForLoadStore(), llvm::LocationSize::beforeOrAfterPointer(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getKnownMinValue(), llvm::LocationSize::getValue(), llvm::LocationSize::hasValue(), llvm::AAResults::isNoAlias(), llvm::LocationSize::isScalable(), llvm::MIPatternMatch::m_GPtrAdd(), llvm::MIPatternMatch::m_ICst(), llvm::MIPatternMatch::m_Reg(), MI, llvm::MIPatternMatch::mi_match(), MRI, llvm::Offset, llvm::Other, llvm::LocationSize::precise(), and Size.