search for: getscopenode

Displaying 16 results from an estimated 16 matches for "getscopenode".

2013 Dec 04
2
[LLVMdev] DwarfDebug problems
Thanks for the quick response. I wrote some code to search “llvm.dbg.cu” for the function (right before the failed assertion): if (TheCU == nullptr) { errs() << "compile unit: " << TheCU << "\n scopeNode(" << FnScope->getScopeNode() << ") => " << *FnScope->getScopeNode() << "\n"; auto fn = MF->getFunction(); errs() << " fn => " << fn->getName() << "\n"; MDNode *node = nullptr; auto mod = fn->getParent(); au...
2013 Dec 04
2
[LLVMdev] DwarfDebug problems
...> >> I wrote some code to search “llvm.dbg.cu” for the function (right before the >> failed assertion): >> >> if (TheCU == nullptr) { >> errs() << "compile unit: " << TheCU << "\n scopeNode(" << >> FnScope->getScopeNode() << ") => " << *FnScope->getScopeNode() << "\n"; >> auto fn = MF->getFunction(); >> errs() << " fn => " << fn->getName() << "\n"; >> >> >> >> MDNode *node = n...
2018 Jan 12
2
StripDeadDebugInfo for static inline functions.
...vm.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's DwarfCompileUnit in the SPMap in case the subprogram 369 /...
2013 Dec 04
0
[LLVMdev] DwarfDebug problems
...for the quick response. > > I wrote some code to search “llvm.dbg.cu” for the function (right before the > failed assertion): > > if (TheCU == nullptr) { > errs() << "compile unit: " << TheCU << "\n scopeNode(" << > FnScope->getScopeNode() << ") => " << *FnScope->getScopeNode() << "\n"; > auto fn = MF->getFunction(); > errs() << " fn => " << fn->getName() << "\n"; > > > > MDNode *node = nullptr; > auto mo...
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's DwarfCompileUnit in the SPMap in case the subprogram 369 /...
2013 Dec 04
0
[LLVMdev] DwarfDebug problems
...te some code to search “llvm.dbg.cu” for the function (right before the >>> failed assertion): >>> >>> if (TheCU == nullptr) { >>> errs() << "compile unit: " << TheCU << "\n scopeNode(" << >>> FnScope->getScopeNode() << ") => " << *FnScope->getScopeNode() << "\n"; >>> auto fn = MF->getFunction(); >>> errs() << " fn => " << fn->getName() << "\n"; >>> >>> >>> >>...
2018 Jan 14
0
StripDeadDebugInfo for static inline functions.
...tatic 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 subprog...
2010 Nov 26
0
[LLVMdev] Next round of DWARF issues/questions
...here's another issue I wanted to mention: I have noticed that debugging and inlining don't play very well together. Even if other optimizations are disabled, if I turn on inlining, I get null pointer errors in this piece of code in DwarfDebug::constructInlinedScopeDIE(): *if* (!Scope->getScopeNode()) *return* NULL; DIScope DS(Scope->getScopeNode()); DIE *ScopeDIE = *new* DIE(dwarf::DW_TAG_inlined_subroutine); DISubprogram InlinedSP = getDISubprogram(DS); CompileUnit *TheCU = getCompileUnit(InlinedSP); DIE *OriginDIE = TheCU->getDIE(InlinedSP); assert(OriginDIE &&am...
2013 Dec 04
2
[LLVMdev] DwarfDebug problems
...) + 925 > 22 clang-3.4 0x00000001033015c3 main + 7283 > 23 libdyld.dylib 0x00007fff8e68d5fd start + 1 (note the line number of the assertion is probably different because I’ve added some prints to help me debug this) When I print the MDNode returned by “FnScope->getScopeNode()”, I get lots of <badref>’s: > !{i32 786478, metadata <badref>, metadata <badref>, metadata !"grappa_wide_get_pointer", metadata !"grappa_wide_get_pointer", metadata !"", i32 53, metadata <badref>, i1 false, i1 true, i32 0, i32 0, null, i32...
2013 Dec 04
0
[LLVMdev] DwarfDebug problems
...3.4 0x00000001033015c3 main + 7283 >> 23 libdyld.dylib 0x00007fff8e68d5fd start + 1 > > (note the line number of the assertion is probably different because I’ve added some prints to help me debug this) > > When I print the MDNode returned by “FnScope->getScopeNode()”, I get lots of <badref>’s: The badrefs are a red herring, so far as I know - they're printed that way even when they're valid references, in my experience. That being said, given your assertion it does look like /something/ is up. It appears as if the function being emitted is s...
2018 Jan 15
1
StripDeadDebugInfo for static inline functions.
...tic 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's DwarfCompileUnit in the SPM...
2018 Jan 12
2
StripDeadDebugInfo for static inline functions.
Hi Paul, Thanks for your response. Let me actually post more details visualizing my case. Assuming that can help. so the IR before the opt tool is running is: ; Function Attrs: nounwind define i16 @main() #0 !dbg !13 { entry: %retval = alloca i16, align 1 ... } ; Function Attrs: inlinehint nounwind define internal void @delay(i16 %d) #4 !dbg !69 { entry: %d.addr = alloca i16,
2010 Nov 26
3
[LLVMdev] Next round of DWARF issues/questions
On Tue, Nov 9, 2010 at 9:04 AM, Devang Patel <dpatel at apple.com> wrote: > > > On Nov 8, 2010, at 10:52 PM, Talin <viridia at gmail.com> wrote: > > On Mon, Nov 8, 2010 at 9:56 AM, Devang Patel < <dpatel at apple.com> > dpatel at apple.com> wrote: > >> >> On Nov 6, 2010, at 7:35 PM, Talin wrote: >> >> After to speaking to Devang
2012 Aug 17
1
[LLVMdev] Debug information causing assertion
We have a test case where we are hitting an assertion in the X86 code generator. The assertion is: "Assertion failed: TheCU && "Unable to find compile unit!", file .\..\..\..\lib\CodeGen\AsmPrinter\DwarfDebug.cpp, line 1411" The bitcode is attached. What I am trying to figure out is what is malformed about our debug that is causing this error? This is reproducible
2014 Aug 27
6
[LLVMdev] Minimizing -gmlt
...ributes + SPCU->applySubprogramAttributesToDefinition(SP, *D); } } } @@ -1670,6 +1676,17 @@ void DwarfDebug::endFunction(const MachineFunction *MF) { LexicalScope *FnScope = LScopes.getCurrentFunctionScope(); DwarfCompileUnit &TheCU = *SPMap.lookup(FnScope->getScopeNode()); + if (TheCU.getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly && LScopes.getAbstractScopesList().empty()) { + assert(ScopeVariables.empty()); + assert(CurrentFnArguments.empty()); + assert(DbgValues.empty()); + assert(AbstractVariables.empty()); + LabelsBeforeIn...
2016 May 08
2
Debug info scope of explicit casting type does not seem correct
That happens because we create the subprogram below as a context to the “DW_TAG_typedef” that was created as a type to “DW_TAG_pointer_type” that was added to the retained type list because of the explicit cast to (T*). This is the code that creates DW_TAG_subprogram: DIE *DwarfUnit::getOrCreateSubprogramDIE(const DISubprogram *SP, bool Minimal) { ... // DW_TAG_inlined_subroutine may refer