search for: getmdkind

Displaying 11 results from an estimated 11 matches for "getmdkind".

Did you mean: get_kind
2010 Mar 16
2
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
...extract the >> filename and line number information out of this metadata? >> >> > > Something like this (you can of course cache TheMetadata and MDDbgKind) > > llvm::MetadataContext *TheMetadata = M->getContext().getMetadata(); > MDDbgKind = TheMetadata->getMDKind("dbg"); > if (MDDbgKind) { > if (MDNode *Dbg = TheMetadata->getMD(MDDbgKind, I)) { > DILocation Loc(Dbg); > ... > Loc.getDirectory() > Loc.getFilename() > Loc.getLineNumber() > Loc.getColumnNumber() > .... > } > A grep throu...
2010 Mar 16
2
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
Dear LLVMers, I'm updating some code to use the new LLVM 2.7 API. One piece of this code uses the findStopPoint() function to find the source filename and line number information of an instruction. What is the best way to do this under LLVM 2.7 now that the stop point intrinsic has been removed? It appears that the debug information is attached as metadata, but what is the easiest way
2010 Mar 16
0
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
...as metadata, but what is the easiest way to extract the > filename and line number information out of this metadata? > Something like this (you can of course cache TheMetadata and MDDbgKind) llvm::MetadataContext *TheMetadata = M->getContext().getMetadata(); MDDbgKind = TheMetadata->getMDKind("dbg"); if (MDDbgKind) { if (MDNode *Dbg = TheMetadata->getMD(MDDbgKind, I)) { DILocation Loc(Dbg); ... Loc.getDirectory() Loc.getFilename() Loc.getLineNumber() Loc.getColumnNumber() .... } } Best regards, --Edwin
2010 Mar 16
0
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
...me and line number information out of this metadata? >>> >>> >> >> Something like this (you can of course cache TheMetadata and MDDbgKind) >> >> llvm::MetadataContext *TheMetadata = M->getContext().getMetadata(); >> MDDbgKind = TheMetadata->getMDKind("dbg"); >> if (MDDbgKind) { >> if (MDNode *Dbg = TheMetadata->getMD(MDDbgKind, I)) { >> DILocation Loc(Dbg); >> ... >> Loc.getDirectory() >> Loc.getFilename() >> Loc.getLineNumber() >> Loc.getColumnNumber...
2010 Mar 16
2
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
Török Edwin wrote: > [snip] >>> Something like this (you can of course cache TheMetadata and MDDbgKind) >>> >>> llvm::MetadataContext *TheMetadata = M->getContext().getMetadata(); >>> MDDbgKind = TheMetadata->getMDKind("dbg"); >>> if (MDDbgKind) { >>> if (MDNode *Dbg = TheMetadata->getMD(MDDbgKind, I)) { >>> DILocation Loc(Dbg); >>> ... >>> Loc.getDirectory() >>> Loc.getFilename() >>> Loc.getLineNumber() >>...
2009 Sep 16
1
[LLVMdev] [proposal] Extensible IR metadata
...#39;s a map from MDKindIds to MDNodes? Comment whether RegisterMDKind requires that its argument is as-yet-unknown in Metadata.h. Context.pImpl->TheMetadata.ValueIsDeleted(this); in ~Value will always call the empty ValueIsDeleted(Value*) overload. Please write a unittest for this. Metadata::getMDKind(Name) can just be "return MDHandlerNames.lookup(Name)" Could you comment what the WeakVH in MDPairTy is following? I got confused and thought it was tracking the Instruction holding the metadata rather than the MDNode. You did say this was partial; sorry if I pointed out anything you w...
2010 Mar 16
0
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
...John Criswell wrote: > Török Edwin wrote: >> [snip] >>>> Something like this (you can of course cache TheMetadata and MDDbgKind) >>>> >>>> llvm::MetadataContext *TheMetadata = M->getContext().getMetadata(); >>>> MDDbgKind = TheMetadata->getMDKind("dbg"); >>>> if (MDDbgKind) { >>>> if (MDNode *Dbg = TheMetadata->getMD(MDDbgKind, I)) { >>>> DILocation Loc(Dbg); >>>> ... >>>> Loc.getDirectory() >>>> Loc.getFilename() >>>>...
2009 Sep 16
0
[LLVMdev] [proposal] Extensible IR metadata
On Fri, Sep 11, 2009 at 9:57 AM, Chris Lattner <clattner at apple.com> wrote: > Devang's work on debug info prompted this, thoughts welcome: > http://nondot.org/sabre/LLVMNotes/ExtensibleMetadata.txt Here is partial initial implementation. Thoughts ? - Devang -------------- next part -------------- A non-text attachment was scrubbed... Name: mdn.diff Type: application/octet-stream
2009 Nov 05
0
[LLVMdev] Debug Information for LLVM 2.6 and TOT
...rmally. - for (; I != NewBB->end(); ++I) + unsigned DbgKind = 0; + MDNode *TheCallMD = NULL; + SmallVector<Value *, 4> MDVs; + LLVMContext &Context = OldFunc->getContext(); + if (TheCall && TheCall->hasMetadata()) { + DbgKind = Context.getMetadata().getMDKind("dbg"); + TheCallMD = Context.getMetadata().getMD(DbgKind, TheCall); + } + for (; I != NewBB->end(); ++I) { + if (TheCallMD && I->hasMetadata()) + if (MDNode *IMD = Context.getMetadata().getMD(DbgKind, I)) { + MDNode *NewMD = UpdateInlinedAtIn...
2009 Nov 05
2
[LLVMdev] Debug Information for LLVM 2.6 and TOT
Devang Patel wrote: > Hi John, > > On Wed, Nov 4, 2009 at 12:04 PM, John Criswell <criswell at uiuc.edu> wrote: > >> Dear All, >> >> 1) I recall reading somewhere that a few optimizations in LLVM 2.6 strip >> away debug information when such information interferes with >> optimization. Is this correct, >> > > Yes. > >
2009 Sep 11
12
[LLVMdev] [proposal] Extensible IR metadata
Devang's work on debug info prompted this, thoughts welcome: http://nondot.org/sabre/LLVMNotes/ExtensibleMetadata.txt -Chris