search for: divari

Displaying 20 results from an estimated 46 matches for "divari".

Did you mean: dibari
2011 Mar 29
0
[LLVMdev] Fwd: Accessing metadata & creating DIVariable
[Forgot to cc list.] Begin forwarded message: > From: Devang Patel <dpatel at apple.com> > Date: March 29, 2011 4:41:30 PM PDT > To: Vedavyas Duggirala <vduggira at gmail.com> > Subject: Re: [LLVMdev] Accessing metadata & creating DIVariable > > > On Mar 29, 2011, at 4:29 PM, Vedavyas Duggirala wrote: > >>>> I get the filename and directory from DISubprogram from reading >>>> llvm.dbg.sp and use >>>> that to DIBuiler::.createCompileUnit. This leads to "duplicate >>&gt...
2011 Oct 17
2
[LLVMdev] Variable name from metadata
Hi All,   Can we extract name of variable name from "MDNode" ?   1. Neither temp_MDNode->getName() nor temp_MDNode->getValueName() give me "global_int" which is name of a variable.   2. I tried below ways as well. DIVariable DV(mdnode1); Value *v = mdnode1->getOperand(0);//gives add 0x69   3. I have written below code to reach till variable name.        LLVMIname is                 const CallInst *CI = dyn_cast<CallInst>(Insn);               const Value* LLVMIValue  = cast<CallInst>(Insn)->getCa...
2011 Mar 28
3
[LLVMdev] Accessing metadata & creating DIVariable
Hi, I am wondering if someone can guide me in adding metadata to IR which already contains some metadata. I am trying to add dbg.declare inst for a local variable I added to a function. I used the DIBuilder to build a DIVariable. When I try to compile llc fails with following message. llc: MCAsmStreamer.cpp:273: virtual void<unnamed>::MCAsmStreamer::EmitLabel(llvm::MCSymbol*): Assertion `Symbol->isUndefined() && "Cannot define a symbol twice!"' failed. I can't figure out what i...
2011 Oct 17
0
[LLVMdev] Variable name from metadata
...t<CallInst>(Insn);                 int numoperands = CI->getNumArgOperands();                 for( unsigned i = 0; i != numoperands; ++i)                 {                   Value *v = CI->getOperand(i);                   MDNode *temp = (MDNode *)CI->getOperand(1) ;                   DIVariable DV(temp);//TO CHECK. remove later                   StringRef varName = DV.getName();                   const char *tmpvarname = varName.data();                   if( i == 1) //points to metadata for variable name                   {   Sorry for posting trivial question.   Regards, Pankaj  ...
2011 Mar 29
0
[LLVMdev] Accessing metadata & creating DIVariable
On Mar 29, 2011, at 8:23 AM, Vedavyas Duggirala wrote: >>>> I am adding local var to existing IR with debug info. I am not using >>>> the Pass infrastructure. >>>> >>>> void InsertDbg(AllocaInst *i, StringRef varname, Instruction, inserbefore) >>>> { >>>> >>>> DIBuilder di(*module); >>>> cu =
2011 Mar 29
0
[LLVMdev] Accessing metadata & creating DIVariable
On Mar 29, 2011, at 11:18 AM, Vedavyas Duggirala wrote: > Hi, > >> You need to call di.createCompileUnit() once for your translation unit in the beginning. You don't need to keep track of CU yourself. DIBuilder will take care of it. After words, you can call di.createBasicType(..) and it will work. > > Actually it doesn't. But if I call di.createCompileUnit(file, dir,
2011 Mar 29
0
[LLVMdev] Accessing metadata & creating DIVariable
>>> I get the filename and directory from  DISubprogram from reading >>> llvm.dbg.sp and use >>> that to DIBuiler::.createCompileUnit. This  leads to  "duplicate >>> symbol" error from llc. >> If the llvm::Module already has llvm.dbg.sp then you don't need to use DIBuilder::createCompileUnit(). The point, I am missing is how did you get
2011 Mar 29
2
[LLVMdev] Accessing metadata & creating DIVariable
Hi, > You need to call di.createCompileUnit() once for your translation unit in the beginning. You don't need to keep track of CU yourself. DIBuilder will take care of it. After words, you can call di.createBasicType(..) and it will work. Actually it doesn't. But if I call di.createCompileUnit(file, dir, producer, ...) with file or dir different from that of CU already in the file,
2011 Mar 29
1
[LLVMdev] Accessing metadata & creating DIVariable
>>> I am  adding local var to existing IR with debug info. I am not using >>> the Pass infrastructure. >>> >>> void InsertDbg(AllocaInst *i, StringRef varname, Instruction, inserbefore) >>> { >>> >>> DIBuilder di(*module); >>> cu = di.createCU        / * How do I get the MDNode of  already in the >>> IR . Instead of
2011 Mar 29
2
[LLVMdev] Accessing metadata & creating DIVariable
I get the filename and directory from DISubprogram from reading llvm.dbg.sp and use that to DIBuiler::.createCompileUnit. This leads to "duplicate symbol" error from llc. >>> You need to call di.createCompileUnit() once for your translation unit in the beginning. You don't need to keep track of CU yourself. DIBuilder will take care of it. After words, you can call
2013 Nov 02
4
[LLVMdev] get function local debug info?
...= e; ++i) { DIArray SPs = CU.getSubprograms(); for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++ i) { DISubprogram SP(SPs.getElement(i)); DIArray Vars = SP.getVariables(); for (unsigned i2 = 0, e2 = Vars.getNumElements(); i2 != e2; ++i2) { DIVariable DV(Vars.getElement(i)); DV.print(errs()); errs() << " : "; DV.getType().dump(); } } } In addition, can I use DebegInfo to get the list of parameters (var names and types) of a subprogram? or I have to parse the underlying metadata and build the...
2013 Nov 03
0
[LLVMdev] get function local debug info?
...IArray SPs = CU.getSubprograms(); > for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++ i) { > DISubprogram SP(SPs.getElement(i)); > DIArray Vars = SP.getVariables(); > for (unsigned i2 = 0, e2 = Vars.getNumElements(); i2 != e2; ++i2) { > DIVariable DV(Vars.getElement(i)); > DV.print(errs()); errs() << " : "; DV.getType().dump(); > } > } > } > > In addition, can I use DebegInfo to get the list of parameters (var names > and types) of a subprogram? or I have to parse the under...
2010 Jul 17
2
[LLVMdev] llvm.dbg.declare
Hi folk, In the Source Level Debugging document, llvm.dbg.declare takes two paramters. "The first argument is the alloca for the variable, cast to a {}*. The second argument is the llvm.dbg.variable containing the description of the variable." The second parameter corresponds to DIVariable, what is the corresponding LLVM class of the first parameter? I want to find which AllocaInst is associated with a given llvm.dbg.declare. Any suggestion? Thanks, Neal -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-de...
2013 Nov 03
0
[LLVMdev] get function local debug info?
...for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++ i) { >>> DISubprogram SP(SPs.getElement(i)); >>> DIArray Vars = SP.getVariables(); >>> for (unsigned i2 = 0, e2 = Vars.getNumElements(); i2 != e2; >>> ++i2) { >>> DIVariable DV(Vars.getElement(i)); >>> DV.print(errs()); errs() << " : "; DV.getType().dump(); >>> } >>> } >>> } >>> >>> In addition, can I use DebegInfo to get the list of parameters (var >>> names...
2016 Mar 03
5
[cfe-dev] RFC: CodeView debug info emission in Clang/LLVM
...as extending DITypeRef to be a union between MDString*, > DIType*, and a type index, but I think that's too invasive. I also don't > want to make a whole DIType heap allocation just to wrap a 32-bit type > index, so I'm in favor of putting the indices into DISubprogram and > DIVariable. > > Any thoughts on this plan? > > On Thu, Oct 29, 2015 at 10:11 AM, Dave Bartolomeo via cfe-dev < > cfe-dev at lists.llvm.org> wrote: >> >> *Proposed Design* >> >> *How Debug Info is Generated* >> >> The CodeView type records for a comp...
2010 Jul 15
0
[LLVMdev] Trying to access the user defined variable name
...ata !9, metadata !"u", metadata !2, > i32 3, metadata !6} ; [DW_TAG_auto_variable ] > > From here, I am trying invain to access the variable name. > Is there something wrong in my approach? I feel that I have not > understood the method to access metadata in llvm. > Use DIVariable from DebugInfo.h to access fields of MDNode that is holding variable's info. - Devang
2017 Sep 05
2
RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value
...work with the type stuff, my understanding of IR mechanics is pretty naïve, so I'd appreciate any explanations that help me understand why the following might be really lame. In optimized code, for things like the address-taken case, does the alloca survive? Assuming it does, can we attach the DIVariable metadata to the alloca instead of having a separate dbg.declare? (It has always seemed to me that this would make some things a lot simpler, as you don't have to troll around looking for that other instruction, use-lists aren't special cased for debug info instructions, and probably ot...
2013 Jul 22
0
[LLVMdev] [RFC] Add warning capabilities in LLVM.
...ke this: - The message string is text but a single kind of markup is allowed: <debug/>, for example: "We cannot vectorize <debug/> because <debug/> is an unfriendly variable" (where the first will be replaced by text derived from a DIScope and the second from a DIVariable). - The structure is this: struct Msg { const char *Message; Function *F; // If nothing else, we can extract a useful name from here, hopefully. SmallVector<DIDescriptor, 2> DIs; // Should be DIDescriptor* ? }; Then, in the backend, we can look for a DbgValueI...
2015 Apr 29
2
[LLVMdev] Assertion failure (Bug 21609) in DwarfFile.cpp
Hi Folks, I ran into this assertion failure while compiling a function with a large number of arguments: https://llvm.org/bugs/show_bug.cgi?id=21609 I have coded up the fix as per David's suggestion (added a new header field for DIVariable to separate out ArgNo & LineNo). The proposed diff is attached to the bug. However, there are around 175 testcases across clang & llvm that need to be udpated to reflect the new schema. One such eg: diff --git a/test/Instrumentation/AddressSanitizer/debug_info.ll b/test/Instrumentatio...
2010 Jul 19
0
[LLVMdev] llvm.dbg.declare
...In the Source Level Debugging document,  llvm.dbg.declare takes two > paramters.  "The first argument is the alloca for the variable, cast to a > {}*. The second argument is the llvm.dbg.variable containing the description > of the variable."  The second parameter corresponds to DIVariable, what is > the corresponding LLVM class of the first parameter?    I want to find which > AllocaInst is associated with a given llvm.dbg.declare. Any suggestion? It is just a cast whose 1st operand is alloca. - Devang