search for: lexicalscop

Displaying 20 results from an estimated 26 matches for "lexicalscop".

Did you mean: lexicalscope
2011 Jul 27
1
[LLVMdev] LexicalScope Debug Info - Line Number
Hi, I need to find out the line no info for each lexical block in the code being compiled with llc. The docs mention metadata format for debug info for lexical block is !3 = metadata !{ i32, ;; Tag = 11 + LLVMDebugVersion (DW_TAG_lexical_block) metadata, ;; Reference to context descriptor i32, ;; Line
2017 May 09
2
lib/CodeGen/AsmPrinter/DwarfDebug.h:131: void llvm::DbgVariable::addMMIEntry(const llvm::DbgVariable&): Assertion `V.Var == Var && "conflicting variable"' failed.
...902b73c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82) #8 0x0000000002601cd4 llvm::DbgVariable::addMMIEntry(llvm::DbgVariable const&) /mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:130:0 #9 0x0000000002601cd4 llvm::DwarfFile::addScopeVariable(llvm::LexicalScope*, llvm::DbgVariable*) /mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp:104:0 #10 0x00000000025f5a29 llvm::DwarfDebug::createAbstractVariable(llvm::DILocalVariable const*, llvm::LexicalScope*) /mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/l...
2017 May 09
2
lib/CodeGen/AsmPrinter/DwarfDebug.h:131: void llvm::DbgVariable::addMMIEntry(const llvm::DbgVariable&): Assertion `V.Var == Var && "conflicting variable"' failed.
...6_64-linux-gnu/libc.so.6+0x2dc82) >> #8 0x0000000002601cd4 llvm::DbgVariable::addMMIEntry(llvm::DbgVariable const&) /mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:130:0 >> #9 0x0000000002601cd4 llvm::DwarfFile::addScopeVariable(llvm::LexicalScope*, llvm::DbgVariable*) /mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp:104:0 >> #10 0x00000000025f5a29 llvm::DwarfDebug::createAbstractVariable(llvm::DILocalVariable const*, llvm::LexicalScope*) /mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linu...
2011 Oct 12
2
[LLVMdev] Local variable information in scope
Hi all,   Using "CodeGen/LexicalScopes" pass, I could collect scope information i.e. start and end line numbers.   I also want to collect information of variables within the scope.   For the below example:   int global; int func( int t) {    //scope 1   {      int a;      ....   }   return x; }   For "scope 1", I s...
2011 Oct 13
1
[LLVMdev] Local variable information in scope
Hi,   I want to list some additional information on this.   The variable collection I am looking at is, "variables 'declared' in scope".   1. When I traverse the MachineInstructions in the LexicalScopes ranges, and check for variables, I get variables used in this scope.      The variables listed include variables which may not have been declared in the scope. (for example "int t", which is not declared in scope1, is listed.)    I do this by checking if the instruction uses memoperand...
2020 May 31
2
LLC crash while handling DEBUG info
...field should *not* be present, though I do not know the difference between ` DISPFlagDefinition` and ` DISPFlagOptimized`. if that is expected, then we may need to check `nullity` of `DISubprogram::getUnit()` before accessing it at https://github.com/llvm/llvm-project/blob/master/llvm/lib/CodeGen/LexicalScopes.cpp#L53 Thanks, Mahesha On Sun, May 31, 2020 at 11:26 AM David Blaikie <dblaikie at gmail.com> wrote: > In theory the LLVM IR verifier (llvm/lib/IR/Verifier.cpp) should catch > this sort of thing. Maybe it isn't running in llc? It probably should > be. It's also likely...
2011 Oct 12
0
[LLVMdev] Local variable information in scope
On Oct 12, 2011, at 3:14 AM, Pankaj Gode wrote: > Hi all, > > Using "CodeGen/LexicalScopes" pass, I could collect scope information i.e. start and end line numbers. > > I also want to collect information of variables within the scope. > > For the below example: > > int global; > int func( int t) > { > //scope 1 > { > int a; >...
2020 May 31
2
LLC crash while handling DEBUG info
...as been > compiled (so I suppose it must be a definition - though we may not > rely on/verify that/need that to be true at the moment). > > Sounds like you're saying the verifier does check the constraint > you're interested in (ie: you only hit the assert in > lib/CodeGen/LexicalScopes if the code is in violation of the > verifier?) - and the verification check sounds correct/reasonable to > me. (declarations are owned by the unit - whereas definitions are > intentionally owned by the llvm::Function and refer to the unit they > are within so they can be implicitly d...
2011 Oct 05
0
[LLVMdev] collect end line number for scope
...want to decorate MachineInstrs then for the end of scope you're not looking at "}" but instead you're looking at _last_ machine instruction in that scope. Now, if you want to find out start and end MachineInstrs for a lexical scope (and corresponding line numbers) then see CodeGen/LexicalScopes pass. It collects lexical scope information and maps MIs to respective lexical scopes. - Devang On Oct 5, 2011, at 3:48 AM, Pankaj Gode wrote: > Hi, > > The link and the information shared was helpful. > > I will make my problem definition more clear. > While I am "a...
2020 Jun 01
2
LLC crash while handling DEBUG info
...e a definition - though we may not > >> rely on/verify that/need that to be true at the moment). > >> > >> Sounds like you're saying the verifier does check the constraint > >> you're interested in (ie: you only hit the assert in > >> lib/CodeGen/LexicalScopes if the code is in violation of the > >> verifier?) - and the verification check sounds correct/reasonable to > >> me. (declarations are owned by the unit - whereas definitions are > >> intentionally owned by the llvm::Function and refer to the unit they > >> ar...
2020 May 31
2
LLC crash while handling DEBUG info
...ed, retainedNodes: !2) !8 = !DISubroutineType(types: !9) !9 = !{null} !10 = !DILocation(line: 2, column: 1, scope: !7) ----------- Now, if I compile the above modified IR file using LLC, then LLC crashes as below. The crash point is https://github.com/llvm/llvm-project/blob/master/llvm/lib/CodeGen/LexicalScopes.cpp#L53. Reason for crash is `NULL` pointer access. `DISubprogram::getUnit()` returns `NULL` pointer since there is no `unit` field in the related metadata info. ----------- PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Program argument...
2011 Oct 05
2
[LLVMdev] collect end line number for scope
Hi,   The link and the information shared was helpful.   I will make my problem definition more clear. While I am "asm printing" target code, I also want to emit scope related information. Scope related information includes, - for each scope, start line, end line, start column, end column and - scope heirarchy. As scope is delimited by "{" and "}" (for an input
2013 Jul 15
2
[LLVMdev] Regarding scope information for variable declaration.
...iling list archive at Nabble.com. _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu        http://llvm.cs.uiuc.edu/ http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev o instead of using machine instructions to collect scope information, (as used by LexicalScope pass), -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130714/ecd3ed6a/attachment.html>
2013 Jul 12
0
[LLVMdev] Regarding scope information for variable declaration.
I have the same demand. Have you resolved this problems? if so, would you share me the solution? Best Regards. Eric -- View this message in context: http://llvm.1065342.n5.nabble.com/Regarding-scope-information-for-variable-declaration-tp47707p59268.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
2012 Jul 30
3
[LLVMdev] Regarding scope information for variable declaration.
Hi All,   I have question regarding lexical scope information.   If I have .c source with scope as below. void func() {    //-- some code here..    { //parent scope       if() //high pass       {          int i;          for( i =0; i < FRAM_I; i++)          {          }       }       if() //low pass       {          int i;          for( i =0; i < FRAM_J; i++)          {          }       }
2013 Jul 15
0
[LLVMdev] Fwd: Regarding scope information for variable declaration.
...we get 'variable i' mapped to correct scope as corresponding machine instruction is generated for this. This is not a problem as we can't expect variable declaration in a machine instruction, I thought. S o instead of using machine instructions to collect scope information, (as used by LexicalScope pass), I had written code to collect scope information based on LLVM Instructions. I did this by iterating over 'Function->BasicBlock' instead of 'MachineFunction->MachineBasicBlock'. const Function *F1 = MF->getFunction(); for(Function::const_iterator BB = F1->begin()...
2015 May 20
5
[LLVMdev] RFC: Reduce the memory footprint of DIEs (and DIEValues)
...llvm::DwarfUnit::createAndAddDIE(unsigned int, llvm::DIE&, llvm::DINode const*) 46.34 MB 5.0% 189810 llvm::DwarfCompileUnit::constructVariableDIEImpl(llvm::DbgVariable const&, bool) 25.57 MB 2.7% 104752 llvm::DwarfCompileUnit::constructInlinedScopeDIE(llvm::LexicalScope*) 8.19 MB 0.8% 33547 llvm::DwarfCompileUnit::constructImportedEntityDIE(llvm::DIImportedEntity const*) A lot of this is the pair of `SmallVector<, 12>` it has for its values (look into `DIEAbbrev` for the second one). Here's a histogram of how many DIEs have each valu...
2018 Jan 12
2
StripDeadDebugInfo for static inline functions.
...ary 12, 2018 12:16 PM To: Robinson, Paul Cc: llvm-dev at lists.llvm.org; David Blaikie Subject: Re: [llvm-dev] StripDeadDebugInfo for static inline functions. Just one update: the function causing the segmentation fault is the following: 359 void DwarfDebug::constructAbstractSubprogramScopeDIE(LexicalScope *Scope) { 360 assert(Scope && Scope->getScopeNode()); 361 assert(Scope->isAbstractScope()); 362 assert(!Scope->getInlinedAt()); 363 364 const MDNode *SP = Scope->getScopeNode(); 365 366 ProcessedSPNodes.insert(SP); 367 368 // Find the subprogram...
2018 Jan 12
0
StripDeadDebugInfo for static inline functions.
Just one update: the function causing the segmentation fault is the following: 359 void DwarfDebug::constructAbstractSubprogramScopeDIE(LexicalScope *Scope) { 360 assert(Scope && Scope->getScopeNode()); 361 assert(Scope->isAbstractScope()); 362 assert(!Scope->getInlinedAt()); 363 364 const MDNode *SP = Scope->getScopeNode(); 365 366 ProcessedSPNodes.insert(SP); 367 368 // Find the subprogram...
2018 Jan 14
0
StripDeadDebugInfo for static inline functions.
...llvm.org; David Blaikie > *Subject:* Re: [llvm-dev] StripDeadDebugInfo for static inline functions. > > > > Just one update: > > > > the function causing the segmentation fault is the following: > > > > 359 void DwarfDebug::constructAbstractSubprogramScopeDIE(LexicalScope > *Scope) { > > 360 assert(Scope && Scope->getScopeNode()); > > 361 assert(Scope->isAbstractScope()); > > 362 assert(!Scope->getInlinedAt()); > > 363 > > 364 const MDNode *SP = Scope->getScopeNode(); > > 365 > > 366...