search for: getmd

Displaying 14 results from an estimated 14 matches for "getmd".

Did you mean: setmd
2009 Sep 11
0
[LLVMdev] [proposal] Extensible IR metadata
I've got a suggestion for a refinement: Right now, we have classes like DILocation that wrap an MDNode* to provide more convenient access to it. It would be more convenient for users if instead of MDNode *DbgInfo = Inst->getMD(MDKind::DbgTag); Inst2->setMD(MDKind::DbgTag, DbgInfo); they could write: DILocation DbgInfo = Inst->getMD<DILocation>(); inst2->setMD(DbgInfo); we'd use TheContext->RegisterMDKind<MyKindWrapper>() or ...Register<MyKindWrapper>("name"); to regist...
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
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 t...
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.getColumnNu...
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 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 = UpdateInlined...
2009 Sep 11
4
[LLVMdev] [proposal] Extensible IR metadata
...2009 15:20, Jeffrey Yasskin wrote: > I've got a suggestion for a refinement: > > Right now, we have classes like DILocation that wrap an MDNode* to > provide more convenient access to it. It would be more convenient for > users if instead of > > MDNode *DbgInfo = Inst->getMD(MDKind::DbgTag); > Inst2->setMD(MDKind::DbgTag, DbgInfo); > > they could write: > > DILocation DbgInfo = Inst->getMD<DILocation>(); > inst2->setMD(DbgInfo); > > we'd use TheContext->RegisterMDKind<MyKindWrapper>() or > ...Register<MyKi...
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. > >
2016 Aug 23
5
Memory scope proposal
> Since the scope is “opaque” and target specific, can you elaborate what kind of generic optimization can be performed? Some optimizations that are related to a single thread could be done without needing to know the actual memory scope. For example, an atomic acquire can restrict reordering memory operations after it, but allow reordering of memory operations (except another atomic acquire)
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 Nov 25
3
[LLVMdev] DebugInfo and Metadata Store
Hi All, Now, in llvm trunk we support custom metadata, which can be attached with llvm instructions. One of the user is "debugging information". This user is special (not just because it is in llvm svn tree:) because whenever debug info is available, it is likely that corresponding metadata is attached with almost all instructions. In other words, usually it is all or nothing. This
2016 Apr 18
2
Move InlineCost.cpp out of Analysis?
On 04/18/2016 04:05 PM, Easwaran Raman via llvm-dev wrote: > > > On Mon, Apr 18, 2016 at 3:25 PM, Chandler Carruth <chandlerc at gmail.com > <mailto:chandlerc at gmail.com>> wrote: > > On Mon, Apr 18, 2016 at 3:20 PM Easwaran Raman <eraman at google.com > <mailto:eraman at google.com>> wrote: > > On Mon, Apr 18, 2016 at 3:00 PM,