23 Off = Other.Offset - Offset;
25 if ((Other.Index == Index) && (Other.IsIndexSignExt == IsIndexSignExt)) {
27 if (Other.Base ==
Base)
31 if (
auto *
A = dyn_cast<GlobalAddressSDNode>(
Base))
32 if (
auto *
B = dyn_cast<GlobalAddressSDNode>(Other.Base))
33 if (
A->getGlobal() ==
B->getGlobal()) {
34 Off +=
B->getOffset() -
A->getOffset();
43 if (
auto *
A = dyn_cast<FrameIndexSDNode>(
Base))
44 if (
auto *
B = dyn_cast<FrameIndexSDNode>(Other.Base))
61 bool IsIndexSignExt =
false;
65 if (
auto *
C = dyn_cast<ConstantSDNode>(Base->
getOperand(1))) {
70 Offset +=
C->getSExtValue();
96 IsIndexSignExt =
true;
104 Offset += cast<ConstantSDNode>(Index->
getOperand(1))->getSExtValue();
108 IsIndexSignExt =
true;
110 IsIndexSignExt =
false;
111 Base = PotentialBase;
unsigned getOpcode() const
Return the SelectionDAG opcode value for this node.
const SDValue & getOperand(unsigned Num) const
bool equalBaseIndex(BaseIndexOffset &Other, const SelectionDAG &DAG)
MachineFunction & getMachineFunction() const
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
bool isFixedObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a fixed stack object.
Simple integer binary arithmetic operators.
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
bool MaskedValueIsZero(SDValue Op, const APInt &Mask, unsigned Depth=0) const
Return true if 'Op & Mask' is known to be zero.
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
Helper struct to parse and store a memory address as base + index + offset.
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
static BaseIndexOffset match(SDValue Ptr, const SelectionDAG &DAG)
Parses tree in Ptr for base, index, offset addresses.
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation...