28 if (!Base.getNode() || !
Other.Base.getNode())
33 Off = *
Other.Offset - *Offset;
35 if ((
Other.Index == Index) && (
Other.IsIndexSignExt == IsIndexSignExt)) {
37 if (
Other.Base == Base)
43 if (
A->getGlobal() ==
B->getGlobal()) {
44 Off +=
B->getOffset() -
A->getOffset();
55 A->isMachineConstantPoolEntry() ==
B->isMachineConstantPoolEntry();
57 if (
A->isMachineConstantPoolEntry())
58 IsMatch =
A->getMachineCPVal() ==
B->getMachineCPVal();
60 IsMatch =
A->getConstVal() ==
B->getConstVal();
63 Off +=
B->getOffset() -
A->getOffset();
75 if (
A->getIndex() ==
B->getIndex())
99 if (!BasePtr0.
getBase().getNode())
103 if (!BasePtr1.
getBase().getNode())
107 if (BasePtr0.equalBaseIndex(BasePtr1, DAG, PtrDiff)) {
115 IsAlias = !(
static_cast<int64_t
>(NumBytes0.
getValue().getFixedValue()) <=
123 IsAlias = !((PtrDiff +
static_cast<int64_t
>(
124 NumBytes1.
getValue().getFixedValue())) <= 0);
152 if ((IsFI0 || IsGV0 || IsCV0) && (IsFI1 || IsGV1 || IsCV1)) {
154 if (IsFI0 != IsFI1 || IsGV0 != IsGV1 || IsCV0 != IsCV1) {
158 if (IsGV0 && IsGV1) {
179 int64_t OtherBitSize, int64_t &BitOffset)
const {
188 BitOffset = 8 * Offset;
189 return BitOffset + OtherBitSize <= BitSize;
206 bool IsIndexSignExt =
false;
223 switch (
Base->getOpcode()) {
244 unsigned int IndexResNo = (
Base->getOpcode() == ISD::LOAD) ? 1 : 0;
245 if (LSBase->isIndexed() &&
Base.getResNo() == IndexResNo)
247 auto Off =
C->getSExtValue();
263 if (
Base->isAnyAdd()) {
276 Index =
Base->getOperand(1);
281 Index = Index->getOperand(0);
282 IsIndexSignExt =
true;
290 Index = Index->getOperand(0);
292 Index = Index->getOperand(0);
293 IsIndexSignExt =
true;
295 IsIndexSignExt =
false;
296 Base = PotentialBase;
311#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
318 OS <<
"BaseIndexOffset base=[";
323 OS <<
"] offset=" << Offset;
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
This file provides utility analysis objects describing memory locations.
static BaseIndexOffset matchLSNode(const LSBaseSDNode *N, const SelectionDAG &DAG)
Parses tree in Ptr for base, index, offset addresses.
This file describes how to lower LLVM code to machine code.
LLVM_ABI bool contains(const SelectionDAG &DAG, int64_t BitSize, const BaseIndexOffset &Other, int64_t OtherBitSize, int64_t &BitOffset) const
LLVM_ABI void print(raw_ostream &OS) const
BaseIndexOffset()=default
static LLVM_ABI BaseIndexOffset match(const SDNode *N, const SelectionDAG &DAG)
Parses tree in N for base, index, offset addresses.
static LLVM_ABI bool computeAliasing(const SDNode *Op0, const LocationSize NumBytes0, const SDNode *Op1, const LocationSize NumBytes1, const SelectionDAG &DAG, bool &IsAlias)
LLVM_ABI void dump() const
LLVM_ABI bool equalBaseIndex(const BaseIndexOffset &Other, const SelectionDAG &DAG, int64_t &Off) const
Helper struct to store a base, index and offset that forms an address.
BaseIndexOffset()=default
bool hasValidOffset() const
Base class for LoadSDNode and StoreSDNode.
TypeSize getValue() const
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
bool isFixedObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a fixed stack object.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
Represents one node in the SelectionDAG.
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation.
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
const TargetLowering & getTargetLoweringInfo() const
MachineFunction & getMachineFunction() const
LLVM_ABI bool MaskedValueIsZero(SDValue Op, const APInt &Mask, unsigned Depth=0) const
Return true if 'Op & Mask' is known to be zero.
virtual SDValue unwrapAddress(SDValue N) const
This class implements an extremely fast bulk output stream that can only output to a stream.
@ C
The default llvm calling convention, compatible with C.
@ ADD
Simple integer binary arithmetic operators.
@ SIGN_EXTEND
Conversion operators.
bool match(Val *V, const Pattern &P)
This is an optimization pass for GlobalISel generic memory operations.
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.