LLVM 22.0.0git
llvm::GISelAddressing Namespace Reference

Classes

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

Functions

LLVM_ABI BaseIndexOffset getPointerInfo (Register Ptr, MachineRegisterInfo &MRI)
 Returns a BaseIndexOffset which describes the pointer in Ptr.
LLVM_ABI 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.
LLVM_ABI 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 185 of file LoadStoreOpt.cpp.

References aliasIsKnownForLoadStore(), llvm::LocationSize::beforeOrAfterPointer(), llvm::dyn_cast(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getKnownMinValue(), llvm::LocationSize::getValue(), llvm::LocationSize::hasValue(), 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(), Register, and Size.