LLVM 20.0.0git
|
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 . | |
bool llvm::GISelAddressing::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
.
IsAlias
accordingly. Definition at line 104 of file LoadStoreOpt.cpp.
References llvm::GISelAddressing::BaseIndexOffset::getBase(), llvm::getDefIgnoringCopies(), llvm::GISelAddressing::BaseIndexOffset::getOffset(), getPointerInfo(), llvm::LocationSize::getValue(), llvm::GISelAddressing::BaseIndexOffset::hasValidOffset(), llvm::LocationSize::hasValue(), llvm::MachineFrameInfo::isFixedObjectIndex(), llvm::LocationSize::isScalable(), llvm::Register::isValid(), and MRI.
Referenced by instMayAlias().
BaseIndexOffset llvm::GISelAddressing::getPointerInfo | ( | Register | Ptr, |
MachineRegisterInfo & | MRI | ||
) |
Returns a BaseIndexOffset which describes the pointer in Ptr
.
Definition at line 83 of file LoadStoreOpt.cpp.
References llvm::getIConstantVRegValWithLookThrough(), Info, llvm::MIPatternMatch::m_GPtrAdd(), llvm::MIPatternMatch::m_Reg(), llvm::MIPatternMatch::mi_match(), MRI, and Ptr.
Referenced by aliasIsKnownForLoadStore().
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.