13#ifndef LLVM_LIB_CODEGEN_SELECTIONDAG_SDNODEDBGVALUE_H
14#define LLVM_LIB_CODEGEN_SELECTIONDAG_SDNODEDBGVALUE_H
87 if (kind !=
Other.kind)
120 SDDbgOperand(
const Value *
C) : kind(
CONST) { u.Const =
C; }
122 SDDbgOperand(
unsigned VRegOrFrameIdx,
Kind Kind) : kind(
Kind) {
124 "Invalid SDDbgValue constructor");
126 u.VReg = VRegOrFrameIdx;
128 u.FrameIx = VRegOrFrameIdx;
141 size_t NumLocationOps;
145 size_t NumAdditionalDependencies;
146 SDNode **AdditionalDependencies;
153 bool Invalid =
false;
154 bool Emitted =
false;
159 bool IsIndirect,
DebugLoc DL,
unsigned O,
bool IsVariadic)
160 : NumLocationOps(L.
size()),
162 NumAdditionalDependencies(Dependencies.
size()),
164 Var(Var), Expr(Expr),
DL(
DL), Order(O), IsIndirect(IsIndirect),
165 IsVariadic(IsVariadic) {
166 assert(IsVariadic || L.size() == 1);
167 assert(!(IsVariadic && IsIndirect));
169 llvm::copy(Dependencies, AdditionalDependencies);
206 NumAdditionalDependencies);
249 : Label(Label),
DL(
std::
move(dl)), Order(O) {}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This file defines the BumpPtrAllocator interface.
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Allocate memory in an ever growing pool, as if by bump-pointer.
Base class for variables.
Wrapper class representing virtual and physical registers.
Holds the information from a dbg_label node through SDISel.
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
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.
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)
SDNode * getSDNode() const
Returns the SDNode* for a register ref.
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.
struct llvm::SDDbgOperand::@505::@506 s
const Value * getConst() const
Returns the Value* for a constant.
bool operator==(const SDDbgOperand &Other) const
SDNode * Node
Valid for expressions.
Holds the information from a dbg_value node through SDISel.
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.
@ C
The default llvm calling convention, compatible with C.
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.
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.
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,...