9#ifndef LLVM_CODEGEN_SELECTIONDAGADDRESSANALYSIS_H
10#define LLVM_CODEGEN_SELECTIONDAGADDRESSANALYSIS_H
38 std::optional<int64_t> Offset;
39 bool IsIndexSignExt =
false;
44 : Base(Base), Index(Index), IsIndexSignExt(IsIndexSignExt) {}
47 : Base(Base), Index(Index), Offset(Offset),
48 IsIndexSignExt(IsIndexSignExt) {}
55 Offset = Offset.value_or(0) + VectorOff;
76 int64_t &BitOffset)
const;
81 return contains(DAG, BitSize,
Other, OtherBitSize, BitOffset);
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 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
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, offset addresses.
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
LLVM_ABI bool equalBaseIndex(const BaseIndexOffset &Other, const SelectionDAG &DAG, int64_t &Off) const
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...
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.