Lines Matching defs:MDNode
52 // Use CallbackVH to hold MDNode operands.
55 MDNode *getParent() {
63 return reinterpret_cast<MDNode*>(Cur) - 1;
95 // MDNode implementation.
99 /// the end of the MDNode.
100 static MDNodeOperand *getOperandPtr(MDNode *N, unsigned Op) {
106 void MDNode::replaceOperandWith(unsigned i, Value *Val) {
111 MDNode::MDNode(LLVMContext &C, ArrayRef<Value*> Vals, bool isFunctionLocal)
130 /// ~MDNode - Destroy MDNode.
131 MDNode::~MDNode() {
157 if (MDNode *MD = dyn_cast<MDNode>(V))
163 static const Function *assertLocalFunction(const MDNode *N) {
170 if (MDNode *MD = dyn_cast<MDNode>(V))
187 // critical code because it recursively visits all the MDNode's operands.
188 const Function *MDNode::getFunction() const {
201 void MDNode::destroy() {
204 this->~MDNode();
209 /// function-local MDNode.
212 (isa<MDNode>(V) && cast<MDNode>(V)->isFunctionLocal());
215 MDNode *MDNode::getMDNode(LLVMContext &Context, ArrayRef<Value*> Vals,
228 MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint);
254 void *Ptr = malloc(sizeof(MDNode) + Vals.size() * sizeof(MDNodeOperand));
255 N = new (Ptr) MDNode(Context, Vals, isFunctionLocal);
266 MDNode *MDNode::get(LLVMContext &Context, ArrayRef<Value*> Vals) {
270 MDNode *MDNode::getWhenValsUnresolved(LLVMContext &Context,
276 MDNode *MDNode::getIfExists(LLVMContext &Context, ArrayRef<Value*> Vals) {
280 MDNode *MDNode::getTemporary(LLVMContext &Context, ArrayRef<Value*> Vals) {
281 MDNode *N =
282 (MDNode *)malloc(sizeof(MDNode) + Vals.size() * sizeof(MDNodeOperand));
283 N = new (N) MDNode(Context, Vals, FL_No);
290 void MDNode::deleteTemporary(MDNode *N) {
291 assert(N->use_empty() && "Temporary MDNode has uses!");
297 "Temporary MDNode does not have NotUniquedBit set!");
299 "Temporary MDNode has DestroyFlag set!");
305 Value *MDNode::getOperand(unsigned i) const {
307 return *getOperandPtr(const_cast<MDNode*>(this), i);
310 void MDNode::Profile(FoldingSetNodeID &ID) const {
319 void MDNode::setIsNotUniqued() {
326 void MDNode::replaceOperand(MDNodeOperand *Op, Value *To) {
331 // non-function-local MDNode, it can't point to a function-local object.
332 // Handle this case by implicitly dropping the MDNode reference to null.
333 // Likewise if the MDNode is function-local but for a different function.
363 // If we are dropping an argument to null, we choose to not unique the MDNode
378 if (MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint)) {
406 MDNode *MDNode::getMostGenericFPMath(MDNode *A, MDNode *B) {
452 MDNode *MDNode::getMostGenericRange(MDNode *A, MDNode *B) {
516 return MDNode::get(A->getContext(), EndPoints);
523 static SmallVector<TrackingVH<MDNode>, 4> &getNMDOps(void *Operands) {
524 return *(SmallVector<TrackingVH<MDNode>, 4>*)Operands;
529 Operands(new SmallVector<TrackingVH<MDNode>, 4>()) {
543 MDNode *NamedMDNode::getOperand(unsigned i) const {
545 return dyn_cast<MDNode>(&*getNMDOps(Operands)[i]);
549 void NamedMDNode::addOperand(MDNode *M) {
552 getNMDOps(Operands).push_back(TrackingVH<MDNode>(M));
575 void Instruction::setMetadata(StringRef Kind, MDNode *Node) {
580 MDNode *Instruction::getMetadataImpl(StringRef Kind) const {
587 void Instruction::setMetadata(unsigned KindID, MDNode *Node) {
643 MDNode *Instruction::getMetadataImpl(unsigned KindID) const {
661 MDNode*> > &Result) const {
687 MDNode*> > &Result) const {