13#ifndef LLVM_LIB_CODEGEN_SELECTIONDAG_SDNODEDBGVALUE_H
14#define LLVM_LIB_CODEGEN_SELECTIONDAG_SDNODEDBGVALUE_H
86 if (kind !=
Other.kind)
119 SDDbgOperand(
const Value *
C) : kind(
CONST) { u.Const =
C; }
121 SDDbgOperand(
unsigned VRegOrFrameIdx,
Kind Kind) : kind(
Kind) {
123 "Invalid SDDbgValue constructor");
125 u.VReg = VRegOrFrameIdx;
127 u.FrameIx = VRegOrFrameIdx;
140 size_t NumLocationOps;
144 size_t NumAdditionalDependencies;
145 SDNode **AdditionalDependencies;
152 bool Invalid =
false;
153 bool Emitted =
false;
158 bool IsIndirect,
DebugLoc DL,
unsigned O,
bool IsVariadic)
159 : NumLocationOps(L.
size()),
161 NumAdditionalDependencies(Dependencies.
size()),
163 Var(Var), Expr(Expr),
DL(
DL), Order(O), IsIndirect(IsIndirect),
164 IsVariadic(IsVariadic) {
165 assert(IsVariadic || L.size() == 1);
166 assert(!(IsVariadic && IsIndirect));
167 std::copy(L.begin(), L.end(), LocationOps);
168 std::copy(Dependencies.
begin(), Dependencies.
end(), AdditionalDependencies);
206 NumAdditionalDependencies);
249 : Label(Label),
DL(
std::
move(dl)), Order(O) {}
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.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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.
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)
unsigned VReg
Valid for registers.
unsigned getResNo() const
Returns the ResNo for a register ref.
unsigned getVReg() const
Returns the Virtual Register for a VReg.
unsigned ResNo
Valid for expressions.
static SDDbgOperand fromVReg(unsigned 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.
const Value * getConst() const
Returns the Value* for a constant.
struct llvm::SDDbgOperand::@475::@476 s
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.
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,...