9#ifndef LLVM_CODEGEN_SELECTIONDAGADDRESSANALYSIS_H
10#define LLVM_CODEGEN_SELECTIONDAGADDRESSANALYSIS_H
39 std::optional<StackOffset> Offset;
40 bool IsIndexSignExt =
false;
45 : Base(Base), Index(Index), IsIndexSignExt(IsIndexSignExt) {}
52 : Base(Base), Index(Index), Offset(Offset),
53 IsIndexSignExt(IsIndexSignExt) {}
69 return Offset->getFixed();
92 int64_t &BitOffset)
const;
97 return contains(DAG, BitSize,
Other, OtherBitSize, BitOffset);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file provides utility analysis objects describing memory locations.
Helper struct to parse and store a memory address as base + index + offset.
LLVM_ABI bool equalBaseIndex(const BaseIndexOffset &Other, const SelectionDAG &DAG, StackOffset &Off) const
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
bool hasValidStackOffset() const
BaseIndexOffset()=default
bool hasValidOffset() const
void addToOffset(int64_t VectorOff)
BaseIndexOffset(SDValue Base, SDValue Index, int64_t Offset, bool IsIndexSignExt)
bool equalBaseIndex(const BaseIndexOffset &Other, const SelectionDAG &DAG) const
static LLVM_ABI BaseIndexOffset match(const SDNode *N, const SelectionDAG &DAG)
Parses tree in N for base, index, and fixed/scalable offsets.
bool contains(const SelectionDAG &DAG, int64_t BitSize, const BaseIndexOffset &Other, int64_t OtherBitSize) const
BaseIndexOffset(SDValue Base, SDValue Index, bool IsIndexSignExt)
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
int64_t getOffset() const
BaseIndexOffset(SDValue Base, SDValue Index, StackOffset Offset, bool IsIndexSignExt)
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...
StackOffset holds a fixed and a scalable offset in bytes.
int64_t getFixed() const
Returns the fixed component of the stack.
static StackOffset getFixed(int64_t Fixed)
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.