Lines Matching refs:MDNode

53 // Use CallbackVH to hold MDNode operands.
56 MDNode *getParent() {
64 return reinterpret_cast<MDNode*>(Cur) - 1;
98 // MDNode implementation.
102 /// the end of the MDNode.
103 static MDNodeOperand *getOperandPtr(MDNode *N, unsigned Op) {
109 void MDNode::replaceOperandWith(unsigned i, Value *Val) {
114 MDNode::MDNode(LLVMContext &C, ArrayRef<Value*> Vals, bool isFunctionLocal)
133 /// ~MDNode - Destroy MDNode.
134 MDNode::~MDNode() {
160 if (MDNode *MD = dyn_cast<MDNode>(V))
166 static const Function *assertLocalFunction(const MDNode *N) {
173 if (MDNode *MD = dyn_cast<MDNode>(V))
191 // critical code because it recursively visits all the MDNode's operands.
192 const Function *MDNode::getFunction() const {
205 void MDNode::destroy() {
208 this->~MDNode();
213 /// function-local MDNode.
216 (isa<MDNode>(V) && cast<MDNode>(V)->isFunctionLocal());
219 MDNode *MDNode::getMDNode(LLVMContext &Context, ArrayRef<Value*> Vals,
232 MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint);
257 void *Ptr = malloc(sizeof(MDNode) + Vals.size() * sizeof(MDNodeOperand));
258 N = new (Ptr) MDNode(Context, Vals, isFunctionLocal);
269 MDNode *MDNode::get(LLVMContext &Context, ArrayRef<Value*> Vals) {
273 MDNode *MDNode::getWhenValsUnresolved(LLVMContext &Context,
279 MDNode *MDNode::getIfExists(LLVMContext &Context, ArrayRef<Value*> Vals) {
283 MDNode *MDNode::getTemporary(LLVMContext &Context, ArrayRef<Value*> Vals) {
284 MDNode *N =
285 (MDNode *)malloc(sizeof(MDNode) + Vals.size() * sizeof(MDNodeOperand));
286 N = new (N) MDNode(Context, Vals, FL_No);
293 void MDNode::deleteTemporary(MDNode *N) {
294 assert(N->use_empty() && "Temporary MDNode has uses!");
300 "Temporary MDNode does not have NotUniquedBit set!");
302 "Temporary MDNode has DestroyFlag set!");
308 Value *MDNode::getOperand(unsigned i) const {
310 return *getOperandPtr(const_cast<MDNode*>(this), i);
313 void MDNode::Profile(FoldingSetNodeID &ID) const {
322 void MDNode::setIsNotUniqued() {
329 void MDNode::replaceOperand(MDNodeOperand *Op, Value *To) {
334 // non-function-local MDNode, it can't point to a function-local object.
335 // Handle this case by implicitly dropping the MDNode reference to null.
336 // Likewise if the MDNode is function-local but for a different function.
366 // If we are dropping an argument to null, we choose to not unique the MDNode
381 if (MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint)) {
409 MDNode *MDNode::getMostGenericFPMath(MDNode *A, MDNode *B) {
455 MDNode *MDNode::getMostGenericRange(MDNode *A, MDNode *B) {
519 return MDNode::get(A->getContext(), EndPoints);
526 static SmallVector<TrackingVH<MDNode>, 4> &getNMDOps(void *Operands) {
527 return *(SmallVector<TrackingVH<MDNode>, 4>*)Operands;
532 Operands(new SmallVector<TrackingVH<MDNode>, 4>()) {
546 MDNode *NamedMDNode::getOperand(unsigned i) const {
548 return dyn_cast<MDNode>(&*getNMDOps(Operands)[i]);
552 void NamedMDNode::addOperand(MDNode *M) {
555 getNMDOps(Operands).push_back(TrackingVH<MDNode>(M));
578 void Instruction::setMetadata(StringRef Kind, MDNode *Node) {
583 MDNode *Instruction::getMetadataImpl(StringRef Kind) const {
634 void Instruction::setMetadata(unsigned KindID, MDNode *Node) {
690 MDNode *Instruction::getMetadataImpl(unsigned KindID) const {
707 MDNode*> > &Result) const {
733 MDNode*> > &Result) const {