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 {
306 return *getOperandPtr(const_cast<MDNode*>(this), i);
309 void MDNode::Profile(FoldingSetNodeID &ID) const {
318 void MDNode::setIsNotUniqued() {
325 void MDNode::replaceOperand(MDNodeOperand *Op, Value *To) {
330 // non-function-local MDNode, it can't point to a function-local object.
331 // Handle this case by implicitly dropping the MDNode reference to null.
332 // Likewise if the MDNode is function-local but for a different function.
362 // If we are dropping an argument to null, we choose to not unique the MDNode
377 if (MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint)) {
405 MDNode *MDNode::getMostGenericTBAA(MDNode *A, MDNode *B) {
412 SmallVector<MDNode *, 4> PathA;
413 MDNode *T = A;
416 T = T->getNumOperands() >= 2 ? cast_or_null<MDNode>(T->getOperand(1)) : 0;
419 SmallVector<MDNode *, 4> PathB;
423 T = T->getNumOperands() >= 2 ? cast_or_null<MDNode>(T->getOperand(1)) : 0;
429 MDNode *Ret = 0;
441 MDNode *MDNode::getMostGenericFPMath(MDNode *A, MDNode *B) {
487 MDNode *MDNode::getMostGenericRange(MDNode *A, MDNode *B) {
551 return MDNode::get(A->getContext(), EndPoints);
558 static SmallVector<TrackingVH<MDNode>, 4> &getNMDOps(void *Operands) {
559 return *(SmallVector<TrackingVH<MDNode>, 4>*)Operands;
564 Operands(new SmallVector<TrackingVH<MDNode>, 4>()) {
578 MDNode *NamedMDNode::getOperand(unsigned i) const {
580 return dyn_cast<MDNode>(&*getNMDOps(Operands)[i]);
584 void NamedMDNode::addOperand(MDNode *M) {
587 getNMDOps(Operands).push_back(TrackingVH<MDNode>(M));
610 void Instruction::setMetadata(StringRef Kind, MDNode *Node) {
615 MDNode *Instruction::getMetadataImpl(StringRef Kind) const {
622 void Instruction::setMetadata(unsigned KindID, MDNode *Node) {
678 MDNode *Instruction::getMetadataImpl(unsigned KindID) const {
696 MDNode*> > &Result) const {
722 MDNode*> > &Result) const {