search for: diarray

Displaying 19 results from an estimated 19 matches for "diarray".

2014 Jul 21
2
[LLVMdev] LTO type uniquing: ODR assertion failure
...gt;> >> >> We still have access to types via MDNodes directly and the assertion that >> assumes all accesses to DITypes are accessing the resolved DIType will fire >> >> i.e assert(Ty == resolve(Ty.getRef())) >> >> One example is the access to DIType via DIArray in SubroutineType. If all >> elements in the type array are DITypes we can create a DITypeArray and use >> that for SubroutineType's type array instead. But we currently have >> unspecified parameter in the type array and it is not a DIType. > > > I am going to work o...
2014 Jul 21
4
[LLVMdev] LTO type uniquing: ODR assertion failure
...ses to DITypes are accessing the resolved DIType >> >> >> will >> >> >> fire >> >> >> >> >> >> i.e assert(Ty == resolve(Ty.getRef())) >> >> >> >> >> >> One example is the access to DIType via DIArray in SubroutineType. >> >> >> If >> >> >> all >> >> >> elements in the type array are DITypes we can create a DITypeArray >> >> >> and >> >> >> use >> >> >> that for SubroutineType's type a...
2014 Jul 21
2
[LLVMdev] LTO type uniquing: ODR assertion failure
...the assertion >> >> that >> >> assumes all accesses to DITypes are accessing the resolved DIType will >> >> fire >> >> >> >> i.e assert(Ty == resolve(Ty.getRef())) >> >> >> >> One example is the access to DIType via DIArray in SubroutineType. If >> >> all >> >> elements in the type array are DITypes we can create a DITypeArray and >> >> use >> >> that for SubroutineType's type array instead. But we currently have >> >> unspecified parameter in the type ar...
2013 Nov 02
4
[LLVMdev] get function local debug info?
Hi, If I have an instance of DISubprogram, can I get the debug info of local variables of the function, including parameters? I tried to use the getVariables() function defined in DISubprogram, but it seemed to return an empty DIArray node when I ran my pass alone using opt. Do I need to enable any other analysis passes in order to populate the data? My related snippet of code is like the following: NamedMDNode *M_Nodes = M.getNamedMetadata("llvm.dbg.cu"); for (unsigned i = 0, e = M_Nodes->getNumOperan...
2014 Jul 14
3
[LLVMdev] LTO type uniquing: ODR assertion failure
We still have access to types via MDNodes directly and the assertion that assumes all accesses to DITypes are accessing the resolved DIType will fire i.e assert(Ty == resolve(Ty.getRef())) One example is the access to DIType via DIArray in SubroutineType. If all elements in the type array are DITypes we can create a DITypeArray and use that for SubroutineType's type array instead. But we currently have unspecified parameter in the type array and it is not a DIType. What are your thoughts? Suggestions are welcome. Is it a goo...
2013 Nov 03
0
[LLVMdev] get function local debug info?
...lt;luzhao at cs.utah.edu> wrote: > Hi, > > If I have an instance of DISubprogram, can I get the debug info of local > variables of the function, including parameters? > > I tried to use the getVariables() function defined in DISubprogram, but it > seemed to return an empty DIArray node when I ran my pass alone using opt. > Do I need to enable any other analysis passes in order to populate the data? > > My related snippet of code is like the following: > > NamedMDNode *M_Nodes = M.getNamedMetadata("llvm.dbg.cu"); > for (unsigned i = 0, e =...
2013 Nov 03
0
[LLVMdev] get function local debug info?
...gt;>> >>> If I have an instance of DISubprogram, can I get the debug info of local >>> variables of the function, including parameters? >>> >>> I tried to use the getVariables() function defined in DISubprogram, but >>> it seemed to return an empty DIArray node when I ran my pass alone using >>> opt. Do I need to enable any other analysis passes in order to populate the >>> data? >>> >>> My related snippet of code is like the following: >>> >>> NamedMDNode *M_Nodes = M.getNamedMetadata("l...
2015 Feb 19
4
[LLVMdev] Parameter names in IR and debug info
...r another function whose signature differs only in the names of the formals. Also the function type could be used as the referent of a pointer type, which could then be used as the type of a variable, without any actual function at all. To build corresponding debug info, I must: 6. Build a llvm::DIArray, using llvm::getOrCreateArray, from the results of 4. 7. Build a llvm::DIComposite type for the function, using llvm::createSubroutineType, from the result of 6. 8. Build a llvm::DIFunction using llvm::createFunction, from the result of 7. Here, I need the formal values, with names, first, bef...
2010 Dec 10
0
[LLVMdev] question on generating dwarf metadata
...supports, at most, a single returned value, this might be a bug. Looking at the code in lib/CodeGen/AsmPrinter/DwarfDebug.cpp around line 1035, this does appear to be the case. Indeed, it is a bug/missing feature. Please file a bugzilla PR to track this. One approach to solve this would be to use DIArray as return type in case of multiple return values. - Devang
2011 Oct 28
0
[LLVMdev] DIBuilder - what's with the null compile units?
...SmallVector<Value *, 4> Variables; > for (unsigned ii = 0, ee = NMD->getNumOperands(); ii != ee; ++ii) > > It looks as if getFnSpecificMDNode() is always returning NULL in my case - the body of the if statement never gets executed. The two lines above this for loop is DIArray SPs = getOrCreateArray(AllSubprograms); DIType(TempSubprograms).replaceAllUsesWith(SPs); This should populate your CompieUnit's node that holds top level subprograms. - Devang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/piperma...
2010 Dec 06
4
[LLVMdev] question on generating dwarf metadata
On 12/06/2010 12:03 PM, Devang Patel wrote: > As I understand, you are not interested in 'how to use DIFactory'. Do you want > to know what are the fields of metadata to encode debug info for a local variable ? > That'd be > > !7 = metadata !{ > i32, ;; Tag (see below) > metadata, ;; Context > metadata, ;; Name > metadata, ;; Reference to
2014 Aug 27
6
[LLVMdev] Minimizing -gmlt
...ere because we're guaranteed // to have concrete versions of our DW_TAG_subprogram nodes. @@ -751,6 +754,11 @@ void DwarfDebug::beginModule() { for (MDNode *N : CU_Nodes->operands()) { DICompileUnit CUNode(N); DwarfCompileUnit &CU = constructDwarfCompileUnit(CUNode); + DIArray SPs = CUNode.getSubprograms(); + for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i) + SPMap.insert(std::make_pair(SPs.getElement(i), &CU)); + if (CU.getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly) + continue; DIArray ImportedEntities = CUNode.getImporte...
2011 Oct 28
3
[LLVMdev] DIBuilder - what's with the null compile units?
On Mon, Oct 24, 2011 at 9:17 AM, Devang Patel <dpatel at apple.com> wrote: > > On Oct 23, 2011, at 12:03 AM, Talin wrote: > > Just a follow up on this - I am still having problems, I never did figure > out a solution. (I've been running with debug off for the last month so that > I could get work done.) > > Here's what I am seeing: I am definitely calling
2016 Nov 18
2
DWARF gotchas moving from 3.7.1 to 3.9.0
Are you perhaps not calling void Function::setSubprogram (DISubprogram * SP) http://llvm.org/doxygen/classllvm_1_1Function.html#a05a19abc8ee11d5909275d980efa1670 ? -- adrian > On Nov 18, 2016, at 8:46 AM, David Blaikie <dblaikie at gmail.com> wrote: > > (+Adrian who might have some more context here) > > Generally I'd suggest looking at Clang's code to see how
2014 Dec 19
2
[LLVMdev] question about the DIBuilder::createStructType
...a variable of a structure type has to > be allocated store, and to think about how that variable is laid out in > store. > > You must use createMemberType to create a DIType for *each* field (aka > member) in the structure; you then store those DIType's as the elements of > a DIArray which you pass as the 'Elements' parameter to createStructType. > > When creating a structure member, you have to specify this information : > > SizeinBits - the actual size of the member > OffsetInBits - the number of bits between the start o...
2014 Dec 18
2
[LLVMdev] question about the DIBuilder::createStructType
Hello, I'm using DIBuilder to create debugging information, I'm not clear about two things: [1] Could you help explain the meaning and the difference between"alignment" and "offset" of a type ? e.g class Actor{ int age; const char* name; } Besides, I found the denotation of createMemberType and createStructType both have "Member
2013 Nov 08
0
[LLVMdev] get source-level function signature?
...f the function, which is the following: /// getReturnTypeName - Subprogram return types are encoded either as /// DIType or as DICompositeType. StringRef getReturnTypeName() const { DICompositeType DCT(getFieldAs<DICompositeType>(7)); if (DCT.Verify()) { DIArray A = DCT.getTypeArray(); DIType T(A.getElement(0)); return T.getName(); } DIType T(getFieldAs<DIType>(7)); return T.getName(); } I also tried to get the types of parameters by changing the index of A.getElement() and noticed the same issue, namely,...
2015 Jan 19
3
[LLVMdev] Assertion: replaceAllUses of value with new value of different type! being thrown all of a sudden
> On 2015-Jan-19, at 12:38, Frédéric Riss <friss at apple.com> wrote: > > >> On Jan 19, 2015, at 12:04 PM, Christian Schafmeister <chris.schaf at verizon.net> wrote: >> >> >> I forgot to mention this in my initial email. >> >> The build of LLVM that I was using was commit a0d5d7aed8e177cea381b3d054d80c212ece9f2c >> The date on the
2014 Dec 11
5
[LLVMdev] How to get the original function name in C++?
Hi, everyone! I'm new here trapped by a simple problem for days. When LLVM translates C++ source code to IR, it will add a prefix to the function name. For example: source code: int foo(){ return 1; } IR form: define i32 @_Z3foov() #0 { entry: ret i32 1, !dbg !20 } The getName() method returns _Z3foov, then how can I get foo? I know the debugging information is contained in