Go to the documentation of this file.
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()),
162 AdditionalDependencies(Alloc.Allocate<
SDNode *>(Dependencies.
size())),
163 Var(Var), Expr(Expr),
DL(
DL), Order(
O), IsIndirect(IsIndirect),
164 IsVariadic(IsVariadic) {
166 assert(!(IsVariadic && IsIndirect));
198 Dependencies.push_back(DbgOp.getSDNode());
200 Dependencies.push_back(
Node);
206 NumAdditionalDependencies);
249 : Label(Label),
DL(
std::
move(dl)), Order(
O) {}
DIExpression * getExpression() const
Returns the DIExpression pointer for the expression.
Holds the information from a dbg_value node through SDISel.
static SDDbgOperand fromConst(const Value *Const)
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
This is an optimization pass for GlobalISel generic memory operations.
bool operator!=(const SDDbgOperand &Other) const
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
unsigned getResNo() const
Returns the ResNo for a register ref.
Represents one node in the SelectionDAG.
unsigned getOrder() const
Returns the SDNodeOrder.
Holds the information for a single machine location through SDISel; either an SDNode,...
ArrayRef< SDNode * > getAdditionalDependencies() const
const DebugLoc & getDebugLoc() const
Returns the DebugLoc.
unsigned getVReg() const
Returns the Virtual Register for a VReg.
unsigned FrameIx
Valid for stack objects.
LLVM_DUMP_METHOD void dump() const
Holds the information from a dbg_label node through SDISel.
(vector float) vec_cmpeq(*A, *B) C
bool isIndirect() const
Returns whether this is an indirect value.
@ VREG
Value is a virtual register.
This class implements an extremely fast bulk output stream that can only output to a stream.
SmallVector< SDNode * > getSDNodes() const
void clearIsEmitted()
clearIsEmitted - Reset Emitted flag, for certain special cases where dbg.addr is emitted twice.
const Value * getConst() const
Returns the Value* for a constant.
const Value * Const
Valid for constants.
unsigned ResNo
Valid for expressions.
MDNode * getLabel() const
Returns the MDNode pointer for the label.
unsigned VReg
Valid for registers.
Allocate memory in an ever growing pool, as if by bump-pointer.
bool isInvalidated() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
unsigned getOrder() const
Returns the SDNodeOrder.
unsigned getFrameIx() const
Returns the FrameIx for a stack object.
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.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
SDNode * getSDNode() const
Returns the SDNode* for a register ref.
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Base class for variables.
SDNode * Node
Valid for expressions.
SDDbgLabel(MDNode *Label, DebugLoc dl, unsigned O)
const DebugLoc & getDebugLoc() const
Returns the DebugLoc.
static SDDbgOperand fromVReg(unsigned VReg)
bool operator==(const SDDbgOperand &Other) const
static SDDbgOperand fromNode(SDNode *Node, unsigned ResNo)
@ SDNODE
Value is the result of an expression.
SDDbgValue & operator=(const SDDbgValue &Other)=delete
DIVariable * getVariable() const
Returns the DIVariable pointer for the variable.
void setIsInvalidated()
setIsInvalidated / isInvalidated - Setter / getter of the "Invalidated" property.
ArrayRef< SDDbgOperand > getLocationOps() const
LLVM_DUMP_METHOD void print(raw_ostream &OS) const
@ FRAMEIX
Value is contents of a stack location.
size_t size() const
size - Get the array size.
SDDbgValue(BumpPtrAllocator &Alloc, DIVariable *Var, DIExpression *Expr, ArrayRef< SDDbgOperand > L, ArrayRef< SDNode * > Dependencies, bool IsIndirect, DebugLoc DL, unsigned O, bool IsVariadic)
@ CONST
Value is a constant.
void setIsEmitted()
setIsEmitted / isEmitted - Getter/Setter for flag indicating that this SDDbgValue has been emitted to...
we should consider alternate ways to model stack dependencies Lots of things could be done in WebAssemblyTargetTransformInfo cpp there are numerous optimization related hooks that can be overridden in WebAssemblyTargetLowering Instead of the OptimizeReturned which should consider preserving the returned attribute through to MachineInstrs and extending the MemIntrinsicResults pass to do this optimization on calls too That would also let the WebAssemblyPeephole pass clean up dead defs for such as it does for stores Consider implementing and or getMachineCombinerPatterns Find a clean way to fix the problem which leads to the Shrink Wrapping pass being run after the WebAssembly PEI pass When setting multiple variables to the same we currently get code like const It could be done with a smaller encoding like local tee $pop5 local copy
struct llvm::SDDbgOperand::@431::@432 s
LLVM Value Representation.
static SDDbgOperand fromFrameIdx(unsigned FrameIdx)
SmallVector< SDDbgOperand > copyLocationOps() const
Optional< std::vector< StOtherPiece > > Other