LLVM: include/llvm/CodeGen/SelectionDAGAddressAnalysis.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_CODEGEN_SELECTIONDAGADDRESSANALYSIS_H
10#define LLVM_CODEGEN_SELECTIONDAGADDRESSANALYSIS_H
11
15#include
16
17namespace llvm {
18
20
21
22
23
24
25
26
27
28
29
30
31
32
33
35private:
38 std::optional<int64_t> Offset;
39 bool IsIndexSignExt = false;
40
41public:
44 : Base(Base), Index(Index), IsIndexSignExt(IsIndexSignExt) {}
46 bool IsIndexSignExt)
47 : Base(Base), Index(Index), Offset(Offset),
48 IsIndexSignExt(IsIndexSignExt) {}
49
55 Offset = Offset.value_or(0) + VectorOff;
56 }
58 int64_t getOffset() const { return *Offset; }
59
60
61
62
65
71
72
73
76 int64_t &BitOffset) const;
77
80 int64_t BitOffset;
81 return contains(DAG, BitSize, Other, OtherBitSize, BitOffset);
82 }
83
84
85
86 LLVM_ABI static bool computeAliasing(const SDNode *Op0,
91
92
95
98};
99
100}
101
102#endif
This file provides utility analysis objects describing memory locations.
static bool contains(SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C)
SDValue getIndex() const
Definition SelectionDAGAddressAnalysis.h:53
BaseIndexOffset()=default
bool hasValidOffset() const
Definition SelectionDAGAddressAnalysis.h:57
void addToOffset(int64_t VectorOff)
Definition SelectionDAGAddressAnalysis.h:54
BaseIndexOffset(SDValue Base, SDValue Index, int64_t Offset, bool IsIndexSignExt)
Definition SelectionDAGAddressAnalysis.h:45
bool equalBaseIndex(const BaseIndexOffset &Other, const SelectionDAG &DAG) const
Definition SelectionDAGAddressAnalysis.h:66
SDValue getBase() const
Definition SelectionDAGAddressAnalysis.h:51
bool contains(const SelectionDAG &DAG, int64_t BitSize, const BaseIndexOffset &Other, int64_t OtherBitSize) const
Definition SelectionDAGAddressAnalysis.h:78
BaseIndexOffset(SDValue Base, SDValue Index, bool IsIndexSignExt)
Definition SelectionDAGAddressAnalysis.h:43
SDValue getBase()
Definition SelectionDAGAddressAnalysis.h:50
int64_t getOffset() const
Definition SelectionDAGAddressAnalysis.h:58
SDValue getIndex()
Definition SelectionDAGAddressAnalysis.h:52
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.
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.
bool match(Val *V, const Pattern &P)
This is an optimization pass for GlobalISel generic memory operations.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)