13#ifndef LLVM_LIB_CODEGEN_SELECTIONDAG_SDNODEDBGVALUE_H
14#define LLVM_LIB_CODEGEN_SELECTIONDAG_SDNODEDBGVALUE_H
85 return SDDbgOperand(FrameIdx,
FRAMEIX);
88 return SDDbgOperand(
VReg.id(),
VREG);
91 return SDDbgOperand(
Const);
99 if (kind !=
Other.kind)
135 SDDbgOperand(
const Value *
C) : kind(
CONST) { u.Const =
C; }
138 SDDbgOperand(
const GlobalValue *GV,
Kind Kind) : kind(
Kind) {
143 SDDbgOperand(
unsigned VRegOrFrameIdx,
Kind Kind) : kind(
Kind) {
145 "Invalid SDDbgValue constructor");
147 u.VReg = VRegOrFrameIdx;
149 u.FrameIx = VRegOrFrameIdx;
162 size_t NumLocationOps;
166 size_t NumAdditionalDependencies;
167 SDNode **AdditionalDependencies;
174 bool Invalid =
false;
175 bool Emitted =
false;
180 bool IsIndirect,
DebugLoc DL,
unsigned O,
bool IsVariadic)
181 : NumLocationOps(L.
size()),
183 NumAdditionalDependencies(Dependencies.
size()),
185 Var(Var), Expr(Expr), DL(DL), Order(O), IsIndirect(IsIndirect),
186 IsVariadic(IsVariadic) {
187 assert(IsVariadic || L.size() == 1);
188 assert(!(IsVariadic && IsIndirect));
190 llvm::copy(Dependencies, AdditionalDependencies);
227 NumAdditionalDependencies);
270 : Label(Label), DL(
std::
move(dl)), Order(O) {}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the BumpPtrAllocator interface.
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Base class for variables.
Wrapper class representing virtual and physical registers.
MDNode * getLabel() const
Returns the MDNode pointer for the label.
SDDbgLabel(MDNode *Label, DebugLoc dl, unsigned O)
unsigned getOrder() const
Returns the SDNodeOrder.
const DebugLoc & getDebugLoc() const
Returns the DebugLoc.
Holds the information for a single machine location through SDISel; either an SDNode,...
static SDDbgOperand fromNode(SDNode *Node, unsigned ResNo)
bool operator!=(const SDDbgOperand &Other) const
const GlobalValue * getGlobal() const
Returns the GlobalValue whose address describes the variable.
static SDDbgOperand fromFrameIdx(unsigned FrameIdx)
Register getVReg() const
Returns the Virtual Register for a VReg.
unsigned VReg
Valid for registers.
unsigned getResNo() const
Returns the ResNo for a register ref.
unsigned ResNo
Valid for expressions.
struct llvm::SDDbgOperand::@102256054047252322001367132133154236226360121031::@167330344224375143036156327334061363243101214203 s
static SDDbgOperand fromVReg(Register VReg)
unsigned FrameIx
Valid for stack objects.
unsigned getFrameIx() const
Returns the FrameIx for a stack object.
static SDDbgOperand fromConst(const Value *Const)
static SDDbgOperand fromGlobalAddr(const GlobalValue *GV)
SDNode * getSDNode() const
Returns the SDNode* for a register ref.
const GlobalValue * GA
Valid for global addresses.
const Value * Const
Valid for constants.
@ VREG
Value is a virtual register.
@ FRAMEIX
Value is contents of a stack location.
@ SDNODE
Value is the result of an expression.
@ CONST
Value is a constant.
@ GLOBALADDR
Value is the address of a global.
const Value * getConst() const
Returns the Value* for a constant.
bool operator==(const SDDbgOperand &Other) const
SDNode * Node
Valid for expressions.
SDDbgValue & operator=(const SDDbgValue &Other)=delete
LLVM_DUMP_METHOD void print(raw_ostream &OS) const
const DebugLoc & getDebugLoc() const
Returns the DebugLoc.
SDDbgValue(const SDDbgValue &Other)=delete
SmallVector< SDDbgOperand > copyLocationOps() const
DIVariable * getVariable() const
Returns the DIVariable pointer for the variable.
void setIsInvalidated()
setIsInvalidated / isInvalidated - Setter / getter of the "Invalidated" property.
unsigned getOrder() const
Returns the SDNodeOrder.
LLVM_DUMP_METHOD void dump() const
SDDbgValue(BumpPtrAllocator &Alloc, DIVariable *Var, DIExpression *Expr, ArrayRef< SDDbgOperand > L, ArrayRef< SDNode * > Dependencies, bool IsIndirect, DebugLoc DL, unsigned O, bool IsVariadic)
bool isInvalidated() const
ArrayRef< SDDbgOperand > getLocationOps() const
void clearIsEmitted()
clearIsEmitted - Reset Emitted flag, for certain special cases where SDDbgValue is emitted twice.
SmallVector< SDNode * > getSDNodes() const
DIExpression * getExpression() const
Returns the DIExpression pointer for the expression.
ArrayRef< SDNode * > getAdditionalDependencies() const
bool isIndirect() const
Returns whether this is an indirect value.
void setIsEmitted()
setIsEmitted / isEmitted - Getter/Setter for flag indicating that this SDDbgValue has been emitted to...
Represents one node in the SelectionDAG.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
LLVM Value Representation.
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.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
void append_range(Container &C, Range &&R)
Wrapper function to append range R to container C.
class LLVM_GSL_OWNER SmallVector
Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...
ArrayRef(const T &OneElt) -> ArrayRef< T >
OutputIt copy(R &&Range, OutputIt Out)
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
Implement std::hash so that hash_code can be used in STL containers.
TODO: Might pack better if we changed this to a Struct of Arrays, since MachineOperand is width 32,...